Please enable JavaScript to view this site.

 

Navigation: Macros > Macro Language > Variables

Naming Variables

Scroll Prev Up Next More

The first letter of the name of a variable must reflect its type.

 

•Boolean variables start with a lowercase b (eg. bIsLeapYear).

•Integer or Date variables start with a lowercase n (eg. nToday).

•String variables start with a lowercase s (eg. sMonthName).

 

The names you give to your variables should obey the following rules and suggestions.

 

•Variable names must begin with a lowercase b, n, or s, indicating their type. The second character must be a non-accented letter (a..z and A..Z). Subsequent characters may be letters or digits.

oThe use of digits (0..9) as the second character of a variable is reserved for temporary variables. The variable name nDay8 is valid, whereas b88 and b19thYear are invalid because their second character is a digit.

oThe use of an underscore character anywhere in a variable name is reserved for system variables.

•Variable names are case-sensitive.

•We suggest using informative compound names for your variable, and making them more legible by putting the first letter of each word in uppercase (eg. bMondayIsHoliday).

 

See also: declaring variables.

 


Topic 108183, last updated on 08-Oct-2026