Variable Names

Apr 25, 2013

I'm trying to come up with a naming convention for my variables. Am I correct in saying that it can only be alphanumeric and symbols cannot be used?

So I'd have to use eg.

Session1ThinkingCorrectly1text

I can't use underscores or hyphens eg.

Session1_ThinkingCorrectly1_text

3 Replies
Nicole Legault

Here's a handy article I found online: Best Practice for Variable and Method Naming ... The article is written for Javascript but I think a lot of the best practices translate to naming variables in Storyline:


  • Use specific and meaningful names

  • Write variable names consistently

  • Use lowercase/uppercase consistently (might be good idea to use CamelCase for legibility)

  • Don't use same variable name for multiple purposes/actions

  • Don't use too long variable names (e.g. 50 chars). Leads to ugly and hard-to-read code.

  • Decide and use one natural language for naming (e.g., don't mix Spanish and English words)

I think those are some of the most important naming conventions/best practices.

Side note ... I really like how it's easy to re-name Variables in Storyline, I've had to do that quite a few times to keep things more clear and consistent. As far as I can tell, I believe you are right that you cannot use _ in variable names -- which is why it might be extra important to use CamelCase for ease of reading.

This discussion is closed. You can start a new discussion or contact Articulate Support.