Subject: | |
From: | |
Reply To: | Shahan, Ray |
Date: | Wed, 5 May 2004 13:54:45 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi all,
Given the following WS:
01 TEST-RANGE-SW PIC X(1).
88 TEST-RANGE VALUE "B" THRU "Y".
Does the compiler generate code that determines (binary search, etc.) that a variable (or constant) is out of the acceptable range, or does the compiler actually generate code that would result in an evaluation of each condition one at a time?
For example, I could create the self explanatory manual code:
IF "A" < "B"
PERFORM FOUND-IT.
Or I could do this, but would the code have to check for every value of "B" through "Y" to determine that "A" was not in TEST-RANGE?
MOVE "A" TO TEST-RANGE-SW
IF NOT TEST-RANGE
PERFORM FOUND-IT.
TIA for your time,
Ray Shahan
Life is not a journey to the grave with the
intention of arriving safely in a pretty and
well preserved body, but rather to skid in
broadside, thoroughly used up, totally worn out,
and loudly proclaiming:
-- WOW!!! What a Ride! --
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|