Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Reader's Clinic - EVAL

Simon Rayne faxed recently with details of a problem he was having with the EVAL statement. It seemed that the statement following prints the value "1" instead of 2!


0001   eval @ans = 1 ; call catalyst("C","@ans=2") ; print @ans

This is because neither EVAL nor CATALYST call the preprocessor called by the COMPILE statement (the routine responsible for upper case conversion, INSERTS etc). Thus the @ans = 2 fails to compile correctly. Mr Rayne points out that the fix to this is to use uppercase! (i.e. replace @ans with @ANS).

(Volume 3, Issue 1, Page 15)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel