Navigation:  thinBasic language > Data types and variables >

String Equates

Previous pageReturn to chapter overviewNext page

 

String equates

 

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

 

Equates data type

 

Equates declaration has the following syntax:

 

$EquateName = StringExpression

 

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

 

Examples

 

Some equate declaration example:

 

$WINTITLE   = "My application title"

$SEPARATOR  = ","

$POSSIBLESEPARATORS = CHR$(9, 10, 13, 32)

 

Restrictions

 

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

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com