isFunctionDefined: Difference between revisions
Jump to navigation
Jump to search
Verisimilar (talk | contribs) mNo edit summary |
No edit summary |
||
(6 intermediate revisions by 4 users not shown) | |||
Line 4: | Line 4: | ||
|version=1.3b51 | |version=1.3b51 | ||
|description= | |description= | ||
Checks | Checks if a function has been defined using [[defineFunction|defineFunction()]]. Returns {{code|true}}({{code|1}}) if it has, or {{code|false}}({{code|0}}) if it has not. Returns '2' if the entered function is a built-in MapTool function rather than a user-defined function. | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
isFunctionDefined() | isFunctionDefined(name) | ||
</ | </syntaxhighlight> | ||
|examples= | |||
<syntaxhighlight lang="mtmacro" line> | |||
[r: isFunctionDefined("fizzlegwip")] | |||
</syntaxhighlight> | |||
Returns 0. | |||
<syntaxhighlight lang="mtmacro" line> | |||
[h: defineFunction("myNewFunction", "myMacro@token")] | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="mtmacro" line> | |||
[r: isFunctionDefined("myNewFunction")] | |||
</syntaxhighlight> | |||
Returns 1. | |||
<syntaxhighlight lang="mtmacro" line> | |||
[r: isFunctionDefined("input")] | |||
</syntaxhighlight> | |||
Returns 2. | |||
|also= | |also= |
Latest revision as of 23:59, 15 March 2023
This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.
isFunctionDefined() Function
• Introduced in version 1.3b51
Checks if a function has been defined using defineFunction(). Returns
true
(1
) if it has, or false
(0
) if it has not. Returns '2' if the entered function is a built-in MapTool function rather than a user-defined function.Usage
isFunctionDefined(name)
Examples
[r: isFunctionDefined("fizzlegwip")]
Returns 0.
[h: defineFunction("myNewFunction", "myMacro@token")]
[r: isFunctionDefined("myNewFunction")]
Returns 1.
[r: isFunctionDefined("input")]