Hello world/Newbie: Difference between revisions

m
imported>Brie
(Add Nu)
m (→‎{{header|Wren}}: Minor tidy)
Line 2,995:
 
=={{header|Wren}}==
Although Wren is primarily used as an embedded scripting language, there is a standalone version called Wren-CLI which can be run directly from the command line. This is available as a pre-built 64 bit executable for Linux, MacOS and Windows and can be downloaded from [https://github.com/wren-lang/wren-cli/releases/tag/0.34.0 here].
 
Having downloaded and unzipped Wren-CLI, the next job is to create a script. Any text editor can be used for this including simple general purpose ones such as gedit, TextEdit and notepad for the operating systems referred to above.
 
So open the text editor, paste in the following script (yes, it's only one line), and save it to a file called ''helloHello_world.wren'' in the same directory as wren-cli itself:
<syntaxhighlight lang="ecmascriptwren">System.print("Hello world!")</syntaxhighlight>
Now type at the command line (omit ./ if using Windows):
<pre>
./wren-cli helloHello_world.wren
</pre>
to compile and run the script and you should see the archetypal greeting :)
9,482

edits