$SPAD/src/input strtbl.input

Timothy Daly December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1991.

———-

— * —

)set break resume
)spool strtbl.output
)set message test on
)set message auto off
)clear all
--S 1 of 3
t: StringTable(Integer) := table()
--R
--R
--R   (1)  table()
--R                                                   Type: StringTable(Integer)
--E 1
--S 2 of 3
for s in split("My name is Ian Watt.",char " ")
  repeat
    t.s := #s
--R
--R                                                                   Type: Void
--E 2
--S 3 of 3
for key in keys t repeat output [key, t.key]
--R
--R   ["Watt.",5]
--R   ["Ian",3]
--R   ["is",2]
--R   ["name",4]
--R   ["My",2]
--R                                                                   Type: Void
--E 3
)spool
)lisp (bye)

———-

References^{[1] nothing}

4