User Tools

Site Tools


en:variables

This is an old revision of the document!


Variables

Variables that hold numeric values must begin with a letter, and may consist of any number of alpha-numeric characters. They are case sensitive. They may be used interchangeably with numeric constants.

Variables that hold string values follow the same rules as numeric variables, but must end with a dollar sign ($). They may be used interchangeably with string constants.
When you assign a numeric value to a string variable or add a numeric value to a string (concatenate) the number will be automatically converted to a string before the operation is completed. A string value may not be assigned directly to a numeric variable or array element without manually converting it's type using the Int or Float functions.

Variable Assignment
OperatorNameExampleComments
=Assign a Number to a Numeric Variablea = 9
=Assign a String to a String Variablez$ = “Hola.”
=Assign a Number to a String Variableq$ = 9.9
+=Add to Numeric Variablea += 7Same as a = a + 7 1
+=Concatenate to String Variablef$ += “.”Same as f$ = f$ + “.” 1
-=Subtract from Numeric Variablea -= 9Same as a = a - 9 1
*=Multiply Numeric Variablea *= 2Same as a = a * 2 1
/=Divide Numeric Variablea /= 8Same as a = a / 8 1


1 added with version 0.9.9.10

en/variables.1451713349.txt.gz · Last modified: 2020/02/28 10:46 (external edit)