Object Scope and Lifetime Objects exist only as long as they are referenced. When the class function New is called, it assigns the new object to a variable name. The… read more →
Loops Looping expressions come in three flavors: while, repeat…until, and loop. The while statement syntax looks like: while (a lt b) a = a + 1 b = b –… read more →
Included Files You can hide commonly used items in a separate .EXP file. This .EXP file can be included in a script by the statement include “filename.exp” When the compiler reads… read more →
Library Functions Not all functions are Explain-language functions contained within the script itself. Explain™ also includes library functions written by Gamry Instruments in compiled C. To gain access to a… read more →
Licenses The license is a novel concept in Explain™. A license encapsulates a whole group of abilities or skills. Different groups of skills have different license names. An object may… read more →
Local Variables Local variables are created “on the fly” while a function is being executed. They are only known to the function that creates them. For example, the following code… read more →
Global Variables To get around the local variable problem, you can create a global variable. Global variables are declared outside a function and are visible throughout the entire script. You… read more →
If…Else You can control execution of alternative blocks of statements using the syntax: if (Test) Statement1 else Statement2 The Test is an expression which evaluates to a BOOLEAN value (either… read more →
Expressions In programming terminology, an expression is a statement, or portion of a statement, that results in a single value. An example of an expression is 2+3, which evaluates to… read more →
Function-Argument Variables A third type of variable in Explain™’s repertoire is the function argument. You have already seen arguments in the examples in the Global and Local Variables discussions, so… read more →