4,400
edits
Philosopher (talk | contribs) m (nothing much) |
m (Use Nasal highlighter) |
||
Line 4: | Line 4: | ||
A simple hello world example in Nasal would be (to be saved in [[$FG_ROOT]]/Nasal): | A simple hello world example in Nasal would be (to be saved in [[$FG_ROOT]]/Nasal): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="nasal"> | ||
# [[$FG_ROOT]]/Nasal/hello.nas | # [[$FG_ROOT]]/Nasal/hello.nas | ||
print('Hello World!'); | print('Hello World!'); | ||
Line 14: | Line 14: | ||
Strings in Nasal can also use double quotes which support escaping: | Strings in Nasal can also use double quotes which support escaping: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="nasal"> | ||
# hello.nas | # hello.nas | ||
print("Hello\nWorld!"); | print("Hello\nWorld!"); | ||
Line 30: | Line 30: | ||
For example, to print a new line, use: | For example, to print a new line, use: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="nasal"> | ||
print ("\n"); | print ("\n"); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 36: | Line 36: | ||
To print a quoted string, use: | To print a quoted string, use: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="nasal"> | ||
print ("\"quoted string\""); | print ("\"quoted string\""); | ||
</syntaxhighlight> | </syntaxhighlight> |