On 30 October 2013 16:59, DASDBILL2 <dasdbi...@comcast.net> wrote:
>
> X = 0
> IF X=1 THEN
>    DC  C'THIS IS A CONSTANT THAT IS NOW "REACHABLE" SO THE COMPILER WILL NOT 
> "DELETE" IT IN ORDER TO "OPTIMIZE" THE LOAD MODULE."
> ENDIF
>
> or whatever the equivalent syntax is for FORTRAN or other language which 
> cannot tolerate an unreachable comment.

But already a smart compiler will keep track of assignments, so if you
do something like

If x = 1 then
  y = 'This constant may still be eliminated because y is not
subsequently referenced'


One approach is

x = random(0,1)  /* your language's library routine to return a random
number between 0 and 1 */
if x = .1415926718281828 then
  Print('Please check for sun rising in west! Copyright xyz company 2013')

which the compiler presumably can't eliminate even though the chance
of its being printed is smallish. But if the compiler implements the
random number generator...

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to