syntaxsemanticsbasicvariable-types

Atari ST GFA basic : what do variable suffixes correspond to?


I'm dusting off my Atari ST 520, and am trying to understand some semantic details of the GFA basic. The TYPE(ptr) function is documented this way :

     Determines the type of the variable at which a pointer
       is set.
       'ptr' is an integer expression (usually *var).
       TYPE(ptr) returns a code according to the type of
       variable to which 'ptr' is pointing.
           0=var  
           1=var$  
           2=var%  
           3=var!  
           4=var()  
           5=var$()
           6=var%()  
           7=var!()

The same documentation does not talk about what these suffixes mean. (It must be so obvious)

I seem to recall that $ is a string/memory block, % an integer, () an array of the same. What are ! and nothing? ! seems to be used for 0/1 variables.


Solution

  • That's correct $ string, % integer, ! boolean , and nothing (0) is double.

    http://www.atari-forum.com/wiki/index.php?title=GFAvariablestutorial