|
Using set attributes |
Top Previous Next |
|
Set elements have attributes that may be recovered during execution. In particular there are 6 attributes that may be revered in a statement of a for a(setname)=setname.attribute; where setname is the name of the set attribute is one of the following .len length of the current set element
Notes:
Examples:
set id set to find attributes for / aa,'-inf',1,12,24,'13.14',inf /; parameter report(id,*) gives set values; report(id,'value') = id.val; report(id,'length') = id.len; report(id,'offset') = id.off; report(id,'position') = id.pos; report(id,'ord') = id.ord; report(id,'uel') = id.uel;; display report;
which generates the output
**** Exec Error at line 188: Coud not extract number from element: aa (this error is because element "aa" is non numeric)
---- 194 PARAMETER report gives set values
value length offset position ord uel
aa UNDF 2.000 1.000 1.000 4260.000 -inf -INF 4.000 1.000 2.000 2.000 4261.000 1 1.000 1.000 2.000 3.000 3.000 4262.000 12 12.000 2.000 3.000 4.000 4.000 4263.000 24 24.000 2.000 4.000 5.000 5.000 4264.000 13.14 13.140 5.000 5.000 6.000 6.000 4265.000 inf +INF 3.000 6.000 7.000 7.000 4266.000
Note aa has an undefined value |