On Thu, 13 Feb 2014 09:42:32 -0500, Thomas H Puddicombe wrote: >If your application didn't want any storage, why did it waste the system >service's time by asking for none? > It might be that the size is variable, as John G. suggested, and 0 is so unlikely that it is on average a greater waste of time for the application to test for it than to call a system service. To that, add the possibility of coding error in even the very few lines of code needed to test and branch around the call to the system service.
I prefer uniform handling of boundary conditions. I was irritated once to discover that SMP/E indicates a syntax error on "++ FUNCTION(name) FILES(0)..." so I need to test for 0 and branch around the code that generates the FILES() operand. On Thu, 13 Feb 2014 08:35:19 -0500, John Gilmore wrote: > >... I prefer >designs that behave appropriately ands coherently at boundary values. >It should be possible to allocate zero bytes of storage, concatenate a >string of length zero bytes to another one, etc., etc. (I hope I'm not diminishing JWG's evaluation of me by infrequently agreeing with him.) And to FREE the storage not obtained when finished not using it? (Imagine clearing 0 bytes of storage with BCTR; EX ... XC.) -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN