Nasal Hello World: Difference between revisions
Jump to navigation
Jump to search
m (add a GUI example for fg versions that no longer show a console) |
mNo edit summary |
||
Line 8: | Line 8: | ||
This will print the string <code>Hello, World!</code> into the console. | This will print the string <code>Hello, World!</code> into the console. | ||
To show a message inside the FlightGear window using a tooltip instead, use the following snippet: | To show a message inside the FlightGear window using a [[Tooltips|GUI tooltip]] instead, use the following snippet: | ||
<syntaxhighlight lang="nasal"> | <syntaxhighlight lang="nasal"> |
Revision as of 14:44, 12 January 2020
The FlightGear forum has a subforum related to: Nasal Scripting |
Nasal scripting |
---|
Nasal internals |
---|
Memory Management (GC) |
In the programming world, a "Hello, World!" program is used to illustrate basic syntax using a very simple program. The "Hello, World!" program in Nasal would look like this (run this in the Nasal Console):
print("Hello, World!");
This will print the string Hello, World!
into the console.
To show a message inside the FlightGear window using a GUI tooltip instead, use the following snippet:
gui.popupTip("Hello, World!",3);