What is Nasal: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
mNo edit summary
(https://plausible.org/nasal/ is now a dead link (looks like the server was reinstalled). Provide reference link to the last save from the Wayback Machine)
Line 1: Line 1:
{{Template:Nasal Navigation}}
{{Template:Nasal Navigation}}


[[FlightGear]] offers a very powerful functional '''scripting language''' called '''[http://plausible.org/nasal/ Nasal]''', which supports reading and writing of internal [[Property Tree Intro|FlightGear properties]], accessing internal data via extension functions, creating GUI dialogs and much more. While "Nasal" may seem like a weird name, just read it as "FlightGear scripting".
[[FlightGear]] offers a very powerful functional '''scripting language''' called '''Nasal'''<ref>https://web.archive.org/web/20160817183633/https://plausible.org/nasal/</ref>, which supports reading and writing of internal [[Property Tree Intro|FlightGear properties]], accessing internal data via extension functions, creating GUI dialogs and much more. While "Nasal" may seem like a weird name, just read it as "FlightGear scripting".




Line 10: Line 10:


Nasal code can be run by [[aircraft]] configuration files, and it can be embedded in various [[XML]] files (dialog files, animation files, bindings for [[joystick]]s, keyboard and cockpit controls, and even in [[Howto:Nasal in scenery object XML files|scenery objects]]). Nasal is platform independent and designed to be thread safe.
Nasal code can be run by [[aircraft]] configuration files, and it can be embedded in various [[XML]] files (dialog files, animation files, bindings for [[joystick]]s, keyboard and cockpit controls, and even in [[Howto:Nasal in scenery object XML files|scenery objects]]). Nasal is platform independent and designed to be thread safe.
{{Template:Appendix}}

Revision as of 13:04, 31 December 2018


FlightGear offers a very powerful functional scripting language called Nasal[1], which supports reading and writing of internal FlightGear properties, accessing internal data via extension functions, creating GUI dialogs and much more. While "Nasal" may seem like a weird name, just read it as "FlightGear scripting".


Not another scripting language

Nasal uses some of the concepts of ECMA/JavaScript, Python and Perl and implements a simple but complete way of Object Oriented Programming (OOP), Nasal uses an internal garbage collector so that no manual memory management is required by the programmer.

People familiar with other programming languages, and scripting languages like JavaScript in particular, are usually able to learn Nasal rather quickly. FlightGear provides a rich library of simulation-specific and general-purpose functions that can be accessed by Nasal scripts.

Nasal code can be run by aircraft configuration files, and it can be embedded in various XML files (dialog files, animation files, bindings for joysticks, keyboard and cockpit controls, and even in scenery objects). Nasal is platform independent and designed to be thread safe.

References