Is this function defined?

definedp expression
defined? expression

Returns true if the result of expression is a name of a keyword, primitive instruction, or a function defined in the cureent scope of program.

Example:

to f1 :x
  output :x/2
end

to model
  to f2 :x
    output :x + 1
  end
end

"t := (newt $model)

print defined? "f1
print defined? "f2
print (defined? "f2) @ :t

Output:

True
False
True

See also:

Table of Content