Introspection: Difference between revisions

Content added Content deleted
Line 875: Line 875:


*check whether the variable "bloop" exists and whether the math-function "abs()" is available and if yes compute abs(bloop).
*check whether the variable "bloop" exists and whether the math-function "abs()" is available and if yes compute abs(bloop).
<lang lingo>bloopExists = not voidP(value("bloop"))
<lang lingo>-- check existance of bloop in local scope
bloopExists = not voidP(value("bloop"))
-- or for global scope:
-- bloopExists = not voidP(_global.bloop)
absExists = value("abs(1)")=1
absExists = value("abs(1)")=1
if bloopExists and absExists then put abs(bloop)</lang>
if bloopExists and absExists then put abs(bloop) -- or abs(_global.bloop)</lang>


*Report the number of integer variables in global scope, and their sum.
*Report the number of integer variables in global scope, and their sum.