Datentypen

BAP Online Manuals : Compiler Reference Manual : Appendix : Datentypen
Previous: Compiler Example
Next: Tools and Examples

3.6.4. Datentypen

integer

positive or negative numbers, neither fractions nor reals are allowed.

atom

EITHER a sequence of characters starting with a lowercase letter, followed by

  • letters, digits, and the underline character '_'

  • OR any characters within single quotes (i.e. '(-: smile')

  • OR a sequence of characters consisting solely of these symbols:
    +  -  *  /  =   :  .  \  ^  <  >  ?  @  #  $  &
    

NOTE: Atoms and strings are treated identically in this version of BAP. This may change in one of the next versions due to performance optimization.

NOTE: Special characters like 'new line' are written just as they are in C, for example a backslashed followed by an 'n' character causes the cursor to proceed to the beginning of the next line, etc.)

string

a sequence of characters within double quotes (e.i. 'Hello World!')

NOTE: Atoms and strings are treated identically in this version of BAP. This may change in one of the next versions due to performance optimization.

NOTE: Special characters like 'new line' are written just as they are in C, for example a backslashed followed by an 'n' character causes the cursor to proceed to the beginning of the next line, etc.)

character ( in type declarations denoted as 'char' )

a character preceded by an apostrophe (`)

structures ( in type declarations denoted as ' void ')

a structure consist of an atom (which is called 'functor'), followed by an argument list enclosed by round brackets (i.e. functor(arg1,arg2)). The argument list may consist of any kind of data, seperated by commas.

NOTE: If you need to put conjunctions or any operator with the same or a higher precedence than that into an argument list, please enclose them by an extra pair of bracket, i.e. 'call((A,B))'. This is necessary to distinguish it from call(A,B) which has two arguments, A and B respectively.

void

used in declarations to indicate that any type is legal.

variable

Although variables do not represent a data type, they fit well in this list. Variables consist of a capital letter or the underscore character, followed by a sequence of letters, digits or underscore characters. The Variable described only by the underscore character ('_') is called the anonymous variable . It acts like an always uninstantiated variable.


BAP Online Manuals : Compiler Reference Manual : Appendix : Datentypen
Previous: Compiler Example
Next: Tools and Examples