Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Part 2.2The first YASS program

Part 2.2The first YASS program

With most programming languages, a tutorial will begin with a simple program to output "Hello world" to the display. YASS is no different.

Hello world

The hello world application that will be built in ZPE will be both interpreted and compiled and run.

All that is needed for YASS to be able to output some information to the console is the std_out function. The documentation for this function is available at this link.

In laymans terms, std_out is short for standard out, and it defines the default method in which the computer outputs information to the user. Standard out also allows programs to communicate using piping, but that is for a different tutorial.

Standard out takes infinitely many parameters, ranging from one to infinite. This means that there is no limit to how many parameters it can be given.

The more general shorthand for the std_out function is that of the print function.

The following will output "Hello world" to the console:

print("Hello world")

Putting this in a text file and naming it 'First.zpe' or even 'First.txt' then using the interpreter will display Hello world on to the console. To do this, first put the file in the First.zpe file then using the -r ZAC run the program:

zpe -r First.zpe

The output should look something similar to the following (note that this is running on a computer running macOS):

Feedback 👍
Comments are sent via email to me.