Using Variables
October 6, 2005 12:00 AM
A variable is like renting space at a storage facility. You can put anything in the variable you want... text, integers, etc. You can take things out, put things in, or manipulate the items that are stored in the variable. For instance I could create a variable called pageHit and everytime a user views the page, have an action that adds 1 to the variable. If I want to see how many times a user has viewed the page I can look at the contents of the variable. Every variable in Lectora is a variant which means that Lectora will recognize whether the data stored in the variable is text or an integer. If the data in the variable is text and you create an action to "Add to Variable", then everything added is considered a string and concatenated together. If it is an integer then the new number would be added to the number that is there before the action is called.The use of variables is very powerful once you play around with them.Hope this helps.
Discussions have been disabled for this post