casing statement

The casing statement toggles case sensitivity relative to input data and string comparisons in the current program and any called subroutines.

Syntax

casing [on|off|exp]

Parameter(s)

on Enables case sensitivity.
off Disables case sensitivity.
exp Casing is turned on if the expression evaluates to nonzero (true) and turned off if it evaluates to 0 (false).

Description

The FlashBASIC or BASIC casing flag is automatically initialized to the case setting at TCL (which can be set using the TCL case command).

With casing on, the strings "quit", "Quit", and "QUIT" are treated as three different strings of characters. With casing off they are all treated as the same string.

See system(27) and system(28) in system() function for the ability to interrogate the current status of case sensitivity.

This is not to be confused with the functionality of the TCL basic command, which is case sensitive, or the TCL compile command, which is not case sensitive with respect to statement keywords and variable names.

Example(s)

Entering "quit" causes the program to display lowercase. Any uppercase character in input, such as "Quit", causes the program to display "upper case".

casing on
crt "enter quit " :
input quit
if quit = "quit" then crt "lower case" end else crt "upper case"