Variable Types

Variables are used to temporarily store values for future use within your program. The value will be retained as long as the variable is within the scope of execution and will only be changed when the program explicitly instructs it to change.

Variable Types

Syntax Description Example 1 Example 2
int 'variable name' [,'variable name'] Declares a new integer type variable. An integer is a whole number. int OneFish, TwoFish; int RedFish=-328;
float 'variable name' [, 'variable name'] Declares a new floating point type variable. An float can contain a fractional portion after the radix point. float MorningTemperature, AfternoonTemperature; float WaterTemperature=-17.9;