diff options
Diffstat (limited to 'ipl/procs/serial.icn')
-rw-r--r-- | ipl/procs/serial.icn | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ipl/procs/serial.icn b/ipl/procs/serial.icn new file mode 100644 index 0000000..422d25a --- /dev/null +++ b/ipl/procs/serial.icn @@ -0,0 +1,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 |