Clearly, I can use something like this: ∇sink v ⍝ Consume value; no display ∇
... which I'll gladly use in place of 0⍴. However, I found this in IBM's "An Introduction to APL 2": "24. The display of an empty array having rank greater than one may use zero lines, or may extend to multiple lines." That seems ambiguous... I can understand the case for an array of rank N displaying N consecutive CRs. That's consistent with your observation in which '', an empty array of rank 1, displays one CR. But what's the case in which APL 2 (maybe) displays zero lines for an empty array of rank greater than one...? Again: I'm just looking for an expressed definition... I have no argument with IBM's APL 2 showing a particular behavior; I just want to read the part of the spec that calls for that behavior. On Tue, 2014-05-27 at 14:37 -0700, David B. Lamkins wrote: > On Tue, 2014-05-27 at 15:19 -0500, Blake McBride wrote: > > Dear David, > > > > > > First, I assure you, this is how it works. > > I'm certainly not arguing the fact that this is the behavior you've seen > in other implementations. > > I'm simply trying to reconcile the behavior you describe in light of my > long-ago experiences with APL 1 systems. If you take a look at the > FinnAPL Idiom list (which predates APL 2), they describe the 0⍴<value> > idiom for display suppression. > > What I'd really like to see is something in either the IBM Reference > Manual or in the ISO Standard that support your assertion. I've been > unable to find either support or refutation in those references. > > > > > > > I do know of a 0⍴<value> idiom for branching and for nullifying a > > prior value in a subsequent assignment. I am unaware of any need for > > that idiom to prevent printing. Can you give me one example in a > > function? > > Well, sure. This idiom is useful any time I'd like to evaluate a > value-returning function for its side effect(s) without also printing > the result of the function... > > > > > > > > Thanks. > > > > > > Blake > > > > > > > > > > On Tue, May 27, 2014 at 2:32 PM, David B. Lamkins <dlamk...@gmail.com> > > wrote: > > I find this confusing and counterintuitive. > > > > If displaying an empty vector causes the interpreter to emit a > > CR, what > > then becomes of the 0⍴<value> idiom commonly used to suppress > > display of > > <value>? Wouldn't your output be littered with spurious CRs > > every time > > your program executed such a line? > > > > I spent a half-hour digging through the IBM and ISO > > references, finding > > nothing on the subject of display of empty vectors. > > > > On Tue, 2014-05-27 at 13:04 -0500, Blake McBride wrote: > > > a. Neither an empty vector nor a vector of multiple > > elements has a CR > > > in it. The system prints the vector, and then prints a CR. > > CR gets > > > printed either way. > > > > > > > > > b. I found all these errors while porting my production > > code which > > > ran consistently over IBM APL and several other APL's. They > > all print > > > a blank line. > > > > > > > > > On Tue, May 27, 2014 at 12:57 PM, David B. Lamkins > > <da...@lamkins.net> > > > wrote: > > > How is that so? '' is an empty vector. > > > > > > On Mon, 2014-05-26 at 20:30 -0500, Blake McBride > > wrote: > > > > ∇test > > > > [1] '1' > > > > [2] ' ' > > > > [3] '2' > > > > [4] '' > > > > [5] '3' > > > > [6] ∇ > > > > test > > > > 1 > > > > > > > > 2 > > > > 3 > > > > > > > > > > > > > > > > > > > > There should be a blank line between 2 and 3. > > > > > > > > > > > > Thanks. > > > > > > > > > > > > Blake > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >