tips:revmedia:v3i1a8

Reader's Clinic - EVAL

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 MAY 19912.03+EXPERTEVAL, CATALYST, COMPILE

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!

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)

  • tips/revmedia/v3i1a8.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1