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.
3 Replies
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:
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.
Many thanks. Camel case seems the most legible route to go down. It might be worth a feature request for maybe hyphens and underscores in Storyline.
Happy to help!
This discussion is closed. You can start a new discussion or contact Articulate Support.