How to make, save and execute a Nuts file
A Nuts file is a file influenced by the Nuts programming language. To make a Nuts file you need a software called ‘Nuts Writer’. While using this software you realise that it supports 5 lines each file. However, don’t worry; in the Nuts example below you’ll find this won’t affect your software anymore. The example begins below (let’s make a software called ‘exapp’ that says ‘Hello’ to a person called ‘John’);
1. Exapp
Set dst=exapp1
Nuts
2. Exapp1
Set dst=exapp2
Set emt=Hello John!
Emt
3. Exapp2
Set dst=exit
Brk
If you haven’t downloaded the Nuts IDE visit http://gjhost.itch.io to download one.
1.1.1. HOW TO DO THE ABOVE IN ‘NUTS WRITER’.
The above example is a single software. In Nuts, a single software may contain many files; such files are to be called ‘Nuts files’. The set command creates or change a variable. Except the set command, other Nuts commands open another Nuts file as after execution. The ‘dst’ value is where the execution goes next after execution of the entire Nuts file. As the first version of Nuts Writer supports five lines each Nuts file you will have to skip some lines for your Nuts file to be saved. Now let us begin,
· Open Nuts Writer.
· Wait for 5 seconds.
· You are asked the filename, write ‘exapp’ and press enter.
· You are prompted to write ‘LINE1’ write ‘set dst=exapp1’ and press enter.
· You are prompted to write ‘LINE2’ write ‘nuts’ and press enter.
· You are prompted to write ‘LINE3’ leave it empty and press enter.
· You are prompted to write ‘LINE4’ leave it empty and press enter.
· You are prompted to write ‘LINE5’ leave it empty and press enter.
· Now write ‘1’ and press enter to start writing in a file called ‘exapp1’
· You are prompted to write ‘LINE1’ write ‘set dst=exapp2’ and press enter.
· You are prompted to write ‘LINE2’ write ‘set emt=Hello John!’ and press enter.
· You are prompted to write ‘LINE3’ write ‘emt’ and press enter.
· You are prompted to write ‘LINE4’ leave it empty and press enter.
· You are prompted to write ‘LINE5’ leave it empty and press enter.
· Now write ‘1’ and press enter to start writing in a file called ‘exapp2’
· You are prompted to write ‘LINE1’ write ‘set dst=exit’ and press enter.
· You are prompted to write ‘LINE2’ write ‘brk’ and press enter.
· You are prompted to write ‘LINE3’ leave it empty and press enter.
· You are prompted to write ‘LINE4’ leave it empty and press enter.
· You are prompted to write ‘LINE5’ leave it empty and press enter.
· Now write ‘3’ and press enter to exit.
1.2. HOW TO RUN A NUTS FILE IN YOUR PC?
· Open a software called Nuts Opener 1.
· Write in ‘exapp’.
· Press enter to run your ‘exapp’.
1.3. Nuts file basic syntax
In the example below, you are going to see how a Nuts file should look like,
1. Set the dst value.
2. If the command you are going to use requires a value specify it.
3. Write the command you are going to use other than ‘set’.
Thanks for reading, visit http://gjhost.itch.io to download the Nuts Programming Tutorials book or you can even download it right now.
0 Comments