Please enable JavaScript to view this site.

A-Shell Reference

Added September 2021

Beginning with A-Shell 6.5.1706, A-Shell extends the auto-mapped loop counter concept, introduced in version 6.5.1704, to support auto-mapping of any variables with a leading % character in the name, provide they are within a function or procedure. Variables of the form %name are mapped as F,6 and variables of the form %name$ are mapped as s,0 (dynamic strings). For example:

Function Fn'Foo3(seed as i4:inputonly)

   %x = rnd(seed)                      ! auto map1 %x,f,6

   %ran$ = "Random number sequence: "  ! auto map1 %ran$,s,0

   for %i = 1 to 10                    ! auto map1 %i,f,6

       %x = rnd(0)

       %ran$ += str(%x) + ","

   next %i

   ? %ran$;"..."

EndFunction

 

Note that the ability to auto-map variables within a function should not be taken as a blanket invitation to stop mapping local variables! The idea is mainly to use them for incidental, intermediate or temporary values with such limited scope that having to having to map them is more of a distraction than an aid to code readability.

See Also

History

2021 September, A-Shell 6.5.1706:  Feature added to A-Shell