Cold Help System: Programming: ColdC Reference Manual: Language Structure: Tokens


Tokens are the base elements of ColdC. Tokens are simply abstract groupings of text imbued with a specific meaning. There are many different types of tokens ranging from single characters to long words. The following characters and pairs of characters are tokens in ColdC:

{   }   [   ]   #[  ]   `[  ]   (   )   (|  |)  (>  <)
,   ;   =   +=  -=  *=  /=  !   -   +   *   /   %   ..
==  !=  >   >=  <   <=  .   ||  &&  ?   |   @   --  ++

The above tokens are used as operators and punctuation in ColdC expressions and statements.

Identifier

An identifier is another type of ColdC token which is a sequence of alphabetic and numeric characters or underlines not beginning with a number. Identifiers in ColdC are case-sensitive, so the identifiers Car and car are not equivalent. The following are all valid identifiers:

we_3_kings
obj
a

Without additional tokens, identifiers usually represent variables. However, certain identifiers have special meanings to the parser. These reserved words are used in writing certain kinds of statements and expressions. They are:

var, if, else, while, for, switch, case, default,
break, continue, return, catch, any, with handler,
pass, to, in


Tokens | Expressions | Statements


the Cold Dark