$
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$
$     This sample shows how to use the function database
$
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
$
$ function name is muscle    - domain is jumper
$ function name is low_rider - domain is positive integers
$
$ setting up two databases named: low_rider and style
$
&define muscle    -domain jumper
&define low_rider
$
$**********************************************************
$            two variables will be used to populate the function
$
$            values from jjj used to populate the range of function low_rider
&set  jjj  = belair montecarlo impala caprice regal roadmaster
$
$            values from yyy used to populate the range of function muscle
&set  yyy  = 1968   1966 1965 1968      1951   1963
$
$*********************************************      Start of setting up database
$
$            values between ( ) used to populate the domain of jumper
$
&loop hood ( camaro nova gto roadrunner hornet rambler )
   &variable jumper      -add %hood     $ creates a variable named hood in the function
   &set k = &numvar(jumper)             $ returns the number of variables in bumper
$                                                 k should be the number of times through the loop
$
$            associate the muscle car with the year introduced
   &set ttt = &token(%k %yyy )
   &fvput muscle    %hood %ttt                  $ &fvput stores the value ttt into variable named hood
$
$            associate the low_rider car with the order input into the database
   &set sss = &token(%k %jjj)
   &fvput low_rider %k %sss                     $ &fvput stores the value sss into variable named k
&endloop
$
$*********************************************      End of setting up database
$
$
$*********************************************      Now use the database
$
&type
&type Number of entries in function MUSCLE &numvar(jumper)
&type Muscle cars associated with year introduced
$            leaving loop variables blank so it will exit when the database has been depleted
&loop
$*********************************************      defining value of "chrome" to the current string in the database
$                            if chrome is empty then it exits
   &exit &variable(-while jumper @ chrome)
$                            everytime the loop comes around it picks the next value
   &set data = &fvget(muscle %chrome)
   &type function muscle look up %chrome get %data  year
&endloop
$
$*********************************************      set l_acc to number of entries in bling
&type
&type Low Riders in entry order
&loop eee 1 6 1
   &set data = &fvget(low_rider %eee)
   &type variable low_rider look up %eee get  %data entry order
&endloop
&type
$
$*********************************************      more on &variable
$
$  &variable(-while VAR_NAME SEL WHAT) extracts all the names in "var_name" that match SEL
$  and sets the (normal global or local) variable WHAT to the value of the NAME.  It also returns
$  a string .FALSE. if there are more names to be output or .TRUE. if it is finished.
$
&select :early -select HORNET GTO RAMBLER
&select :late  -select ROADRUNN  CAMARO NOVA
&type
&type ************** EARLY
&loop
   &exit   &variable(-while jumper :early  ccc )
   &type   %ccc    is an Early model muscle car
&endloop
&type
&type ************** LATE
&loop qqq 1 3
   &exit  &variable(-while jumper :late   fff )
   &type   %fff    is an Late  model muscle car
&endloop
$
&fini
