Re: Regarding EVALUATE TRUE



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
.



Relevant Pages

  • Re: If you were inventing CoBOL...
    ... Howard Brazee wrote: ... > I've seen other languages do case statements that were clearer and easier to ... I think I've used "ALSO" maybe twice in my entire life. ...
    (comp.lang.cobol)
  • Re: Macro code
    ... > writing a device driver, then languages like C or BLISS are the only way to ...
    (comp.os.vms)
  • Re: Time to revive Emerald?
    ... > They would still need to create new compilers for Macro32 and Bliss. ... would be impossible to move the OS from VAX to Alpha and they did that. ... As for languages, I was under the impression that all GEM-based languages ...
    (comp.os.vms)
  • Re: In the Land of the Blind, the Hoff is truly King!
    ... But I don't know Bliss so maybe it just knows, ... If only John Reagan hadn't been bound, ... writing BLISS code. ... featured in languages like Pascal. ...
    (comp.os.vms)
  • Re: Why COBOL is losing the POWER struggle
    ... Howard Brazee wrote: ... languages that go through years of bureaucracy to get anything ... Here the problem is the bureaucracy and not the language. ... get people actually getting stuff working cheaply before needing to ...
    (comp.lang.cobol)