home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
OL.LZH
/
PROCS.LZH
/
IDENTITY.ICN
< prev
next >
Wrap
Text File
|
1991-09-05
|
705b
|
32 lines
############################################################################
#
# Name: identity.icn
#
# Title: Produce identities for Icon types
#
# Author: Ralph E. Griswold
#
# Date: September 2, 1991
#
############################################################################
#
# This procedure produces an "identity" value for types that have one.
#
############################################################################
procedure identity(x)
return case x of {
"null": &null
"integer": 0
"real": 0.0
"string": ""
"cset": ''
"list": []
"set": set()
"table": table()
default: fail
}
end