As with other programming languages, using variables within SPLASH involves declaring the variables and assigning them values.
integer eventCount;When you have declared the variable, assign it a value using the := operator:
eventCount := 4;
eventCount + 1
float pi := 3.14159265358979; money dollarsPerEuro := 1.58d;
float pi := 3.14159265358979, lambda, e := 2.714;
long "500miles" := 500 * 1760; string "for" := 'for ever';This feature comes directly from SQL.
Explicit variable declarations make SPLASH into a statically typed language like C and Java. This is different than scripting languages like Perl and AWK, which do not force the declaration of variables. At the cost of more characters, it makes the code easier to maintain and allows optimizations that make the code run faster.