String Equates

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Language > Data types and variables >

String Equates


String equates


thinBasic allows you to refer to string constants by name. Those constant values are called equates.

A string equate (constant) must start with $ sign.


Equates data type


Equates declaration has the following syntax:


$EquateName = StringExpression


Equal sign is optional, so the above sentence can also be written as:


$EquateName StringExpression


String equates are like dynamic string that can be up to approximately 2 billion characters in length.




Some equate declaration example:


$WINTITLE   = "My application title"






1.String equates name must start with dollar sign $

2.Unlike variables, you can use an equate on the left side of an assignment statement only once.

3.If an equate has already been created, subsequent attempts to assign a new value will fail but no error will be generated