Variables

=Variables= toc

From the Run BASIC Help Document:

Variable Types
Run BASIC supports three kinds of variables:

Numeric //- Numeric variables can have letters and digits (i, counter, exitFlag, etc.). No % allowed (myInt% for example).// String$ //- String variables are like numeric variables but end in $ (myName$, buffer$, etc.)//
 * 1) object //- Object variables (also called handles)//

Handle Variables
//A handle variable is a kind of object variable with a dollar sign $ at the end. This allows you to dynamically reference objects. A handle variable named #myObject$ actually points to the object named in the variable myObject$.//

Handle variables are most useful when accessed in FOR/NEXT loops, thus eliminating many lines of code.

code format="vb" 'create links using handle variable, with sub event handler

for n=1 to 5 hVar$="lnk"+str$(n) link #hVar$,"[ Link";n;" ]", onOff next n print wait

sub onOff k$ n=val(right$(k$,1)) print "Link";n;" clicked" end sub

code