Global Variables and Functions
Help Topics
 
The field of the global variables and functions of the program editor main window contains a declaration of variables and functions that are common for all functions. In addition to the global variables and functions every function may possess local variables and functions.
 
When creating a new program, the field of global variables and functions contains a group of the basic variables and functions. The basic variables and functions are principal objects necessary for the program to work; they can neither be moved nor deleted.
 
Image bm1090.GIF    main function
 
The main function is a function that is executed at the program start. From the main function all other functions are called. It includes the program itself. By ending the main function the whole program will be terminated. The picture of the main function icon determines the picture which will be displayed as the program icon (in the upper left window corner, when displaying the program in the browser and when displaying the program in the list of the running applications). The main function text determines the text that will be displayed in the main window title, if it is not redefined in some other way.
 
Image bm91.GIF    main sheet
 
The main sheet is a sheet representing the program window surface. The items contained in the main sheet are displayed in the program window. It is in the main sheet that the items are positioned by Peter or Lucy. By changing the main sheet size the program window size is changed (In the fullscreen mode the video mode used is changed).
 
Image bm90.GIF    empty square
 
An empty square is an item which will be used as a default filling out the sheet, for example when deleting a square out of the sheet or when extending the sheet.
 
Image bm107.GIF    Peter
 
Peter is a sprite of the Peter rabbit. By redefining it, Peter's appearance, speed and other features, too, may be modified. By increasing the number of directions to 8 he will be able to step, to position and to test an item in the diagonal direction, too. In the program the Peter sprite may be redefined by another sprite like it may be done in normal sprites.
 
Image bm108.GIF    Lucy
 
Lucy is a sprite of the Lucy rabbit. By redefining it, Lucy's appearance, speed and other features, too, may be modified. By increasing the number of directions to 8 she will be able to step, to position and to test an item in the diagonal direction, too. In the program the Lucy sprite may be redefined by another sprite like it may be done in normal sprites.

Full Html Context Help of The Peter - Gemtree Software & Children Programming