Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

basic

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.

like image 823
Laurent LA RIZZA Avatar asked Feb 14 '23 16:02

Laurent LA RIZZA


1 Answers

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

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

like image 157
Jimmy Smith Avatar answered Mar 07 '23 12:03

Jimmy Smith