Re: [CMS-PIPELINES] I'm stumped

2013-09-06 Thread Glenn Knickerbocker
On 9/5/2013 5:12 PM, Michael Harding wrote: > |Spec printonly EOF a: w3 . set (#0+=1;#5:=a)', > 'if #5>#1 then', Wrong way around. You can *use* the fields in the IF clause, just not *define* them there: '|Spec printonly EOF a: w3 .', 'b: substr 1.8 of w2 . c: substr 9.6 of w2 .', 'i

Re: [CMS-PIPELINES] I'm stumped

2013-09-06 Thread John P. Hartmann
APL knows which operators commutate and which may be merged. I've often thought about the same for the pipeline, but never come up with anything. Still a way to capping the insertion sort at n records would be trivial (he says without looking). Is there a requirement? On 09/06/2013 04:13 P

Re: [CMS-PIPELINES] I'm stumped

2013-09-05 Thread Rob van der Heij
On Thu, Sep 5, 2013 at 11:12 PM, Michael Harding wrote: Seems unnecessarily tortuous to me, but then I'm not programming it > And, I would swear I've used similar code before, deciding how to parse a > record depending on the value of a fixed field. > I.e.... a: w1 . if a=="type1" then b: 10.

Re: [CMS-PIPELINES] I'm stumped

2013-09-05 Thread John P. Hartmann
Mike, you are right right, I was a tad too fast off the mark. The problem is at the end of the 192 string with b:. You can refer to field identifiers in conditional parts, but you cannot define them. I guess I should have reworded message 1037 or at least updated the help file, but such is life

Re: [CMS-PIPELINES] I'm stumped

2013-09-05 Thread Michael Harding
Well, I thought "printonly eof" was a stage option rather than a break, and the latter "eof" following the if clause sets the break action. There aren't any field definitions after that one. Too, from what you're saying it should complain about the definition of a:, when instead it seems to be com

Re: [CMS-PIPELINES] I'm stumped

2013-09-05 Thread John P. Hartmann
Message 192 gives the game away. Wouldn't you say that EOF is a break? On 09/05/2013 09:05 PM, Michael Harding wrote: This: '|Spec printonly EOF a: w3 . set #0+=1', 'if a>#1 then', 'b: substr 1.8 of w2 . c: substr 9.6 of w2 .', 'set (#1:=a;#2:=b;#3:=c) fi', 'eof print #0 st

[CMS-PIPELINES] I'm stumped

2013-09-05 Thread Michael Harding
This: '|Spec printonly EOF a: w3 . set #0+=1', 'if a>#1 then', 'b: substr 1.8 of w2 . c: substr 9.6 of w2 .', 'set (#1:=a;#2:=b;#3:=c) fi', 'eof print #0 strip 5 /samples, max was/ nw print #1 strip nw', '/on/ nw print #2 strip nw /at/ nw print #3 strip nw', causes: PIPSPE1