Nasal library: Difference between revisions

Jump to navigation Jump to search
Add nav template and note about globals namespace
(→‎substr(): Add doc to do with negative integers)
(Add nav template and note about globals namespace)
Line 4: Line 4:
* {{simgear file|simgear/nasal}}
* {{simgear file|simgear/nasal}}


All these functions and variables are in the global namespace, that is, they are directly accessible (e.g., one can call <syntaxhighlight lang="nasal" inline>magvar()</syntaxhighlight> instead of <syntaxhighlight lang="nasal" inline>namespace.magvar()</syntaxhighlight>). For a more complete explanation, see [[Nasal Namespaces in-depth]].
All these functions and variables are in the global namespace, that is, they are directly accessible (e.g., one can call <syntaxhighlight lang="nasal" inline>magvar()</syntaxhighlight> instead of <syntaxhighlight lang="nasal" inline>namespace.magvar()</syntaxhighlight>). However, if a namespace must be used, <code>globals</code> is the correct namespace, but using it is not recommended. For a more complete explanation, see [[Nasal Namespaces in-depth]].


{{tip|Copy & paste the examples into your [[Nasal Console]] and execute them to see what they do.|width=70%}}
{{tip|Copy & paste the examples into your [[Nasal Console]] and execute them to see what they do.|width=70%}}
Line 2,339: Line 2,339:
|text = Converts an angle from radians to degrees when multiplied by the angle in radians. Equal to <code>180 / π</code>.
|text = Converts an angle from radians to degrees when multiplied by the angle in radians. Equal to <code>180 / π</code>.
}}
}}
{{Appendix}}
{{Appendix}}
{{Nasal namespaces}}

Navigation menu