Introspection: Difference between revisions

Lingo added
(Lingo added)
Line 865:
#total</lang>
-> 424
 
=={{header|Lingo}}==
*verify the version/revision of your currently running (compiler/interpreter/byte-compiler/runtime environment/whatever your language uses) and exit if it is too old.
<lang lingo>put _player.productVersion
-- "11.5.9"
 
_player.itemDelimiter="."
if integer(_player.productVersion.item[1])<11 then _player.quit()</lang>
 
*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"))
absExists = value("abs(1)")=1</lang>
 
*Report the number of integer variables in global scope, and their sum.
<lang lingo>cnt = 0
sum = 0
repeat with v in the globals
if integerP(v) then
cnt = cnt + 1
sum = sum + v
end if
end repeat
put cnt
put sum</lang>
 
=={{header|Locomotive Basic}}==
Anonymous user