From: Rick M. <obj...@gm...> - 2007-04-12 12:20:48
|
Hmm, another possibility for the CONDITION keyword would be TRUE and FALSE ASSERT TRUE (a~datatype('w')) ASSERT FALSE (.nil == a) Either TRUE or false is allowed, followed by the other keywords for raising the error messages. Rick On 4/12/07, Rony G. Flatscher <Ron...@wu...> wrote: > > Rick McGuire wrote: > > After some off-list conversations with a long time Rexx user whose > > opinion I highly respect, I'm going to be making a few changes to USE > > STRICT ARG. > > > > The first change is actually a bit of an enhancement. I'm going to > > allow a default value to be specified on the normal form of the > > instruction. Thus you can simply do > > > > USE ARG a, b=1 > > > > if you like. This form will not raise any min/max/omitted error > > conditions on your behalf, but will make handling of default values > > simpler. > > > > The second change is the "promotion" of the ASSERT option on USE ARG. > > ASSERT is turning out to be less useful than I had originally > > envisioned because of the generic error message it issues. However, > > that sort of capability is still nice for general error checking and > > conditions, so I'm going to promote it to a full fledged instruction. > > > > ASSERT a~datatype('w'), b~datatype('w') > > > > Using the list form of the conditional. This instruction can be > > placed anywhere you want to make a data insertion, and is generally > > more flexible than the ASSERT keyword stuck on ARG. > Also, ASSERT in that form could be used for pre- and postconditions as > well. > > --- > > Ad too generic error messages: how about allowing to supply an optional > string to be used in the generic error message? Something like: > > ASSERT a~datatype('w'), b~datatype('w') ERRORMESSAGE ("argument not > a whole number") -- or any > > As ASSERT becomes an own keyword instruction there would enough space on > a line to allow for that optional error message (which should be > buildable from an expression as well). > > ---rony > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |