Step 1: Click anywhere in the terminal area and press enter, this will produce an okay as in fig.2
Step 2: Type in the terminal area:
The * is a times and the hello world MUST have double quotes at the start and end.
Step 3: Enter dim a,f#,s$ in the terminal area then press enter
That has created three variables of three different types, integer, floating point and string.
Step 4: Enter:
You have placed some values in those variables
Step 5: Enter:
We can use variables in the same way as numbers or strings. Try doing the same but using a string variable, for example:
Step 6: Type the above into the text editor (see fig 7) or copy and paste it. Make sure there is a blank line after the endf
Step 7: Use the |A icon to send this text over to the device, when complete you will see that the terminal has 'Done' in its contents (fig. 8)
Step 8: type func() This will run the function just created
This would be better if the text was in a vertical line, we can do this by placing a carriage return and line feed on the end of the text
Step 9: Add \r\n to the en of the text as shown in fig. 10
Step 10: Press |A to send the text over to the device again
Step 11: type myfunc() to run the function again
You can send the modified text or other text as as times as you like, it is stored in the devices RAM ready for running. A function can call other functions and a program is built of many functions. Each one can be tested individually. There are also library functions that have already been written to drive the I/O pins for example or perhaps an LCD display. Thse can be included or added to your own functions.
One possible way of thinking about this is that the functions are like the component parts of a machine, one all of the parts have been created the machine can be put together and also just like in engineering some of the parts can be put together as an assembly and tested before going onto the machine. Yhis is exactly the same for functions.