divert(-1)
# @(#)Copyright (c), 1987, 1993 StatSci, Inc.  All rights reserved.
define(`USED',1)
define(`PROBLEM',-1)
define(`INTERRUPT',-2)	# only used by UNIX now
define(`STR',6)	# structure
define(`DIR',8)	# directory
define(`FUN',9)	# function with saved value
define(`TFUN',10)	# function
define(`CHAINFUN',31)
define(`STACK',15)
define(`DATASET',16)
define(`IF',171)
define(`SERIAL',170)
define(`ANY',11)	# general mode
define(`MISSING',12)define(`MiSsInG',12) #mode for missing arguments (hidden by intf.m)
#   Special Data Structures

define(`TS',20)	# time series
define(`ARRAY',21)
define(`FULL_MATRIX',1)	# used in matrix printing
define(`LOWER_MATRIX',2)	# lower triangle and diagonal
define(`SUBDIAG_MATRIX',3)	# lower triangle without diagonal
#  Structure accessing

#  Sizes

define(`LENTRY',4)	# ints per entry
define(`LHDR',2)	# entries per header

#  Entry Accessing

define(`NAME',is($1))
define(`MODE',is($1+1))
define(`LENGTH',is($1+2))
define(`LACTUAL',is($1+7))
define(`VALUE',is($1+3))
# Directory Header

define(`SNAME',is($1+3))
define(`STYPE',is($1+5))
define(`FIRSTENT',($1+LHDR*LENTRY))
define(`LASTENT',($1+(LHDR+LENGTH($1)-1)*LENTRY))
define(`NEXTENT',($1+LENTRY))
define(`ENTRY',$1+($2+eval(LHDR-1))*LENTRY)
define(`DPOS',($2-$1)/LENTRY-eval(LHDR-1))
define(`ALLENTRY',`FOR($2=FIRSTENT($1), $2<=LASTENT($1), $2=NEXTENT($2))')
define(`VSET',`#
VPTR($1)=VALUE($1)')
## soon define(`VPTR',`$1`'v')
define(`VPTR',`substr(qv$1,0,6)')
divert(0)
SCCS_ID(95785,`@(#)'struct.m 3.9 last edit 2/20/93 StatSci. From BASEFILE)
