$SPAD/src/input alist.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool alist.output
)set message test on
)set message auto off
)clear all
--S 1 of 10
Data := Record(monthsOld : Integer, gender : String)
--R
--R
--R   (1)  Record(monthsOld: Integer,gender: String)
--R                                                                 Type: Domain
--E 1
--S 2 of 10
al : AssociationList(String,Data)
--R
--R                                                                   Type: Void
--E 2
--S 3 of 10
al := table()
--R
--R
--R   (3)  table()
--R      Type: AssociationList(String,Record(monthsOld: Integer,gender: String))
--E 3
--S 4 of 10
al."bob" := [407,"male"]$Data
--R
--R
--R   (4)  [monthsOld= 407,gender= "male"]
--R                              Type: Record(monthsOld: Integer,gender: String)
--E 4
--S 5 of 10
al."judith" := [366,"female"]$Data
--R
--R

--R   (5)  [monthsOld= 366,gender= "female"]
--R                              Type: Record(monthsOld: Integer,gender: String)
--E 5
--S 6 of 10
al."katie" := [24,"female"]$Data
--R
--R
--R   (6)  [monthsOld= 24,gender= "female"]
--R                              Type: Record(monthsOld: Integer,gender: String)
--E 6
--S 7 of 10
al."smokie" := [200,"female"]$Data
--R
--R
--R   (7)  [monthsOld= 200,gender= "female"]
--R                              Type: Record(monthsOld: Integer,gender: String)
--E 7
--S 8 of 10
al
--R
--R
--R   (8)
--R   table
--R      "smokie"= [monthsOld= 200,gender= "female"]
--R  ,
--R      "katie"= [monthsOld= 24,gender= "female"]
--R  ,
--R      "judith"= [monthsOld= 366,gender= "female"]
--R  ,
--R      "bob"= [monthsOld= 407,gender= "male"]
--R      Type: AssociationList(String,Record(monthsOld: Integer,gender: String))
--E 8
--S 9 of 10
al."katie" := [23,"female"]$Data
--R
--R
--R   (9)  [monthsOld= 23,gender= "female"]
--R                              Type: Record(monthsOld: Integer,gender: String)
--E 9
--S 10 of 10
delete!(al,1)
--R
--R
--R   (10)
--R   table

--R      "katie"= [monthsOld= 23,gender= "female"]
--R  ,
--R      "judith"= [monthsOld= 366,gender= "female"]
--R  ,
--R      "bob"= [monthsOld= 407,gender= "male"]
--R      Type: AssociationList(String,Record(monthsOld: Integer,gender: String))
--E 10
)spool
)lisp (bye)

———-

References^{[1] nothing}

6