>>
APLDN Home

>>
Events

>>
Trainings

>>
APL Books

>>
APLDN Links

>>
Discussion Groups

>>
Downloads

>>
Articles

>>
Library

>>
Learning Tools

>>
APLDN User IO

>>
APL2000.com




Features

Author Thread: )output
Dave.Weintraub
)output
Posted: Wednesday, June 07, 2006 6:33 PM (EST)

I am quite glad to have this great feature, but would like to suggest 2 improvements:

 

If the result of an expression is a nested array of items, each of which has 0 rows (and thus would not create any actual output), it would be nice if " )Output Error" ignored these as well.  An example of what I mean here is the result of

'a' 'b' QuadWI¨ Each Enclose 'Delete'

 

Perhaps an ")Output Show", which would show what the error-throwing output *would* have shown, if ")Output On" were set (instead of ")Output Error"), but would not change the )Output setting.  This would be handy when the executed function has changed the state of things, so that it cannot be purely re-executed.

 

(Of course, a System Variable could be used, instead...)

 

Dave


Comments:

Author Thread:
Mark.Osborne
)output
Posted: Thursday, June 08, 2006 2:34 PM (EST)

Dave,

 

Your suggestion of having ")output error" ignore additional cases of non-printing output is the second such request we have had.  Personally I would prefer to find and remove such cases in my code.  I consider many of them coding style errors (though not your example case).  Other programmers such as yourself have a different view and would prefer to ignore these cases as harmless.  I think this is a matter of personal style.  My current thinking is to add one more name to the "ON", "OFF", "ERROR" settings of the ")OUTPUT" command that would behave the way you suggest.

 

If I understand your ")OUTPUT SHOW" suggestion, you are asking for a command that will be used after an error stop caused by ")OUTPUT ERROR".  This would generate a display identical to what would have been displayed at that point in the code if the setting had been ")OUTPUT ON".

 

This sounds usefull, but it pushes the state change issues down into the interpreter code.  At the point the ")OUTPUT" error is triggered, the result has not been generated, and the opportunity to generate it may be gone.  (The same issue also makes ignoring all non-printing output cases difficult.  We don't know what the output is going to be, only that it is going to try to generate something.  This is because we are handling this in the interpreter End of Statement code.  This is prior to the output generation.)

 

I will give this suggestion and the issues around it some thought, but it may not be an easy thing to do.

 

/Mark

     

Paul.Ravitz
)output
Posted: Thursday, June 08, 2006 4:19 PM (EST)
Although I E-mailed a while ago about enhancing )output error to not complain if the "output" produced wouldn't actually display anything (for example, 0{rho}{enclose}''), so I'm not sure if you've already counted my "vote," please consider this another one for that enhancement. All I care about MOST of the time is finding where actual, *observable*, unintended output is being emitted into the session, including all-blank lines (i.e. ''). p

     

Michael.Shumate
)output
Posted: Friday, June 09, 2006 4:57 PM (EST)

Is the problem that )OUTPUT treats these two cases differently:

 

0 0½STATEMENT

 

and

 

0½STATEMENT

What about:

 

""½STATEMENT

     

davin.church
)output
Posted: Saturday, June 10, 2006 10:58 AM (EST)
Michael, your latter example produces a scalar result which is "real" output.

     

Support
)output
Posted: Thursday, June 15, 2006 6:19 PM (EST)

We decided to address this issue by adding a fourth state to the )OUTPUT command:

      )OUTPUT STRICT
 
The new ")OUTPUT STRICT" state only produces "IMPLICIT OUTPUT" errors when visible output is generated.  In addition, this new state produces the "IMPLICIT OUTPUT" error message after the output has been generated, so the effect of the output can be seen. 

All existing ")OUTPUT" command behavior remains unchanged.

The new ")OUTPUT STRICT" state will be implemented in the upcoming release of APL+Win, which we anticipate will be during the first week of July.


APL2000 Support

     

Dave.Weintraub
)output
Posted: Tuesday, June 20, 2006 6:03 PM (EST)

Thanks!  That should handle what I was requesting.

 

Dave

     

Dave.Weintraub
)output
Posted: Monday, November 13, 2006 11:49 AM (EST)

Another suggestion, after the Conference (this replaces my )OUTPUT SHOW suggestion, which I admit was rather obtuse):

)OUTPUT TRACE, which could be combined with the other options:  When implicit output occurs, instead of throwing an error, having TRACE set would cause APL to indicate the function and line on which the output was generated, perhaps with a left arrow, eg:

 

MyFunction[3]

 

(It's up to you whether this indicator would precede or follow the actual implicit output.)

 

This would allow us to keep )OUTPUT on, without breaking our code when it occurred, and have the added advantage that we could then double-click on each of a set of lines which generated implicit output, and fix the offending function line(s) in turn!  In fact, if this were available, I'd probably want to set it in the .INI file, and leave it on all of the time when running production code!

 

Dave

     



APL2000 Official Web Site

I don't pretend to understand the Universe - it's a great deal bigger than I am.
-- Thomas Carlyle

APLDN Home   |    |  Events   |  Trainings   |  APL Books   |  APLDN Links   |    |  Discussion Groups   |    |  Downloads   |  Articles   |  Library   |  Learning Tools   |  APLDN User IO   |  APL2000.com   |