This is down to changes that were made for new versions of ZPE.
Since YASS takes inspiration from many language, YASS is similar to many languages
in the sense that it has a simple
input function. These functions however, are not as straightforward as
they may look and their underlying implementation is different to some other languages.
Back in the days of C and before, the term stdio became popular for describing the function that was used for input and output. Its name means standard I/O (input/output) and its a reference to the standard I/O or stdio library that is used in the C programming language, for example.
ZPE is built upon Java and the stdio library is a part of the implementation. By default, unless ZPE is redirected in either input or output, the input and output to and from any ZPE program is done with stdio.
Standard output in YASS is done with one of two functions:
std_out function, which
std_out is actually a faster version of
print("Hello world!") std_out("Hello world!")
Both of these functions can also take infinitely many values and will join them into one value before displaying them:
A third function for displaying an output is the
write function that was added in
write("Hello world!", 100)
write works differently to the other two functions because it can expect a
delay beforing writing each character to the display. In this case, there will be 100 milliseconds
between each character being written to the display.
Finally, if an error occurs it is better to display an error using the
function that will automatically format and handle the error:
std_err("There was an error in line", "25")
Input in YASS is handled normally by the simple
get_input or the
get_input("Please insert a value") std_in("Please insert a value")
The following example uses a variable to store the result of an input:
$v = get_input("Please insert a value")
As well as these functions, there is also a built-in
that will give a
value based on the result:
$v = get_yes_no("Please insert a value")
S1s and S2s really enjoyed the lesson on cybercrime using the lesson on How to Rob A Bank on… https://t.co/MxjDYE2JFu
8 months ago
S2s doing really well in hardware test! Also really enjoying doing tests electronically rather than on paper.… https://t.co/ritdfcW6Mw
8 months ago
S1 and S2 pupils listing input and output devices and giving answers such as keyboard and mouse but there were also… https://t.co/dGxDkYqFxo
9 months ago