Re: Regarding EVALUATE TRUE
- From: John Reagan <john.reagan@xxxxxx>
- Date: Thu, 16 Aug 2007 11:44:06 -0400
Howard Brazee wrote:
Both options can be useful - and some languages give us both options.
Yep, the main language I use (BLISS) has both SELECT and SELECTONE where SELECT falls through the next section but SELECTONE works like EVALUATE where there is an implicit break to the end.
For COBOL, I like to do things like
EVALUATE TRUE
WHEN I < 256
PERFORM FITS-IN-A-BYTE
WHEN I < 65535
PEROFRM FITS-IN-A-16BITWORD
WHEN OTHER
PERFORM FITS-IN-A-32BITWORD
END-EVALUATE.
The order is important of course.
--
John Reagan
OpenVMS Pascal/Macro-32/COBOL Project Leader
Hewlett-Packard Company
.
- References:
- Regarding EVALUATE TRUE
- From: klshafer@xxxxxxx
- Re: Regarding EVALUATE TRUE
- From: Alistair
- Re: Regarding EVALUATE TRUE
- From: Howard Brazee
- Regarding EVALUATE TRUE
- Prev by Date: Re: field validation (was Re: COBOL/DB2 Date edit question)
- Next by Date: Re: Regarding EVALUATE TRUE
- Previous by thread: Re: Regarding EVALUATE TRUE
- Next by thread: Re: Regarding EVALUATE TRUE
- Index(es):
Relevant Pages
|