Formatting the code

The program that we have created can be written in any number of ways. All of these programs listed below perform exactly the same function as our own program.

do
print ( "hello world" )
sync ( )
loop
do
print("hello world")
sync()
loop
         DO
		PRINT    (  "hello world")
		
		
  SYNC()
 LOOP

The syntax of AppGameKit and its commands are not case sensitive, therefore you can call the command print as PRINT, prINT or Print. Spacing is also not important, which is why you can have spaces before and after brackets. However, you can't have spaces inbetween commands e.g. print cannot be called pri nt. Adding multiple blank lines between commands is also perfectly fine.

You are offered a lot of flexibility when it comes to formatting your code and you can lay things out as you see fit. Although it's not so critical when you're starting out, imagine what it might be like if you have a large program containing thousands of lines of code. Think about how you would want to manage that. Being consistent with spacing and making the code easy to read will help you in the long term.