blob: 422d25adda58804cc3a616eb4893715e2339bee4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
############################################################################
#
# File: serial.icn
#
# Subject: Procedure to return serial number of structure
#
# Author: Ralph E. Griswold
#
# Date: April 19, 1996
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# Procedure to return the serial number of a structure.
#
############################################################################
procedure serial(x) #: structure serial number
return image(x) ? { # fails on non-structure or bogus kind
tab(upto('_') + 1) | fail
return integer(tab(many(&digits)))
}
end
|