Portable Game Console
PoGa-4DGL Reference Manual
Now Press F9 which will compile your program, download it to your PoGa and start running it. You could
also have clicked on “Comp’nLoad” which is the same thing.
Save the program with the file name 'helloworld.4dg'
Snazzy it up
Move the cursor and insert a new line before the ‘print’ statement, type “txt_” and press Ctrl-Space, this
will bring up a list of all the functions starting with “txt_”, select “txt_Height” either by positioning the
cursor and pressing Enter, or by clicking with the mouse.
Keep typing until your code looks like the following.
func main()
txt_Height(2);
txt_Bold(ON);
txt_Italic(ON);
txt_MoveCursor(3, 3);
txt_FGcolour(WHITE);
print("Hello world\n") ;
repeat
forever
endfunc
Since you have used WHITE as a color you need to tell the compiler where to locate the definition of
WHITE, so insert the following line after the platform statement.
#inherit "4DGL_16bitColours.fnc"
If you want to have a look inside ‘4DGL_16bitColours.fnc’, just right click the filename and select ‘Open File
at Cursor’. Now press F9 again and see what is displayed this time.
You may Save As with a different name, like 'helloworld2.4dg'
© 2011 4D Systems
www.4dsystems.com.au
Page 7 of 87
Click Comp'nLoad button