#Define

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > Data types and variables >

#Define

 

Description

 

Creates a numeric or string variable with a syntax similar to C programming language.

 

Syntax

 

Syntax for numeric:

#Define VariableName  NumericExpression

 

Syntax for strings:

#Define VariableName  StringExpression

 

Returns

 

None

 

Parameters

 

Remarks

 

#Define is not a macro command like in C but can be used in thinBasic script to easily port some C code where C #Define is used to create simple macros name/value pairs

 

Restrictions

 

See also

 

Dim

 

Examples

 

'----------------------------------
#Define c        299792458 '---speed of light

#Define FontName "Consolas"