[CM] while testing lists.sal in Grace 1.0.2

Heinrich Taube taube at uiuc.edu
Wed Aug 27 04:34:29 PDT 2008


> Else how does one pick out an element from a list in a given numeric  
> position?
> Is there a general reference for SAL?

you can do what you want two ways:


1. use scheme's list-ref (scheme doesnt have elt):

print list-ref( {q w e r t y}, 3)

2. use sal's [] indexing of variables:

begin
  with foo = {a b c d e}
  print foo[1]
end

the elt is the tutorial mistake  , ill fix it later this morning with  
the other nits.


On Aug 26, 2008, at 10:37 PM, Denis Fitzpatrick wrote:

> while testing lists.sal in Grace 1.0.2 OS X Leopard 10.5.4
>
> with:
> print elt(notes, 0)
> got:
> >>> Error: unbound variable: elt
>
> Else how does one pick out an element from a list in a given numeric  
> position?
> Is there a general reference for SAL?
>
> Thanks.   Grace good.
>
> Denis



More information about the Cmdist mailing list