Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread John P. Hartmann
Right. I never thought of that angle: checking for null and making the counter numeric to prevent any further equality. On 06/28/2016 10:31 PM, Michael Harding wrote: pipe literal *|dup 8|spec if #0=='' then set #0:=-5 else set #0+=1 endif print #0 n|Cons -5 -4 -3

Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread Michael Harding
pipe literal *|dup 8|spec if #0=='' then set #0:=-5 else set #0+=1 endif print #0 n|Cons -5 -4 -3 -2 -1 0 1 2 3 Ready; T=0.01/0.01 13:26:02 -- Mike Harding z/VM System Support > From: "John P. Hartmann" > To: CM

Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread John P. Hartmann
As an aside, PATTERN has ONCE, but I suppose I'd forgot about it when I got to that point with SPECS. On 06/28/2016 09:36 PM, Glenn Knickerbocker wrote: How the heck do I set a nonzero initial value?

Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread John P. Hartmann
#0 will never become positive. Is that what you wanted? On 06/28/2016 09:36 PM, Glenn Knickerbocker wrote: if #0=='' then set #0:=-12 else set #0+=1

Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread John P. Hartmann
Oh, I did mean = rather than ==, but both will work as an uninitialised counter contains NULL rather than any particular value and NULL will compare to 0 and to an empty string. (I've been doing too much C lately.) On 06/28/2016 09:36 PM, Glenn Knickerbocker wrote: and never thought to examine

Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread Glenn Knickerbocker
On 6/28/2016 1:58 PM, John P. Hartmann wrote: > specs if #0==0 then set #0:=1;#1:=42 endif > On 06/28/2016 06:13 PM, Glenn Knickerbocker wrote: >> How the heck do I set a nonzero initial value? Aha, I missed: > The counters are initialised to contain a null value and never thought to examine t

Re: [CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread John P. Hartmann
specs if #0==0 then set #0:=1;#1:=42 endif On 06/28/2016 06:13 PM, Glenn Knickerbocker wrote: In saving an example for myself, I thought I'd reproduce NUMBER FROM using a counter, given that: NUMBER is a convenience; the same result can be obtained by incrementing a counter. How the hec

[CMS-PIPELINES] Speaking of SPECS NUMBER

2016-06-28 Thread Glenn Knickerbocker
In saving an example for myself, I thought I'd reproduce NUMBER FROM using a counter, given that: > NUMBER is a convenience; the same result can be obtained by > incrementing a counter. How the heck do I set a nonzero initial value? I thought BREAK