Program Structure

In this chapter we will learn about using many source code files in the same project.

Source Code File Sections

Each source code file may contains the next sections (in the same order).

Source Code File Sections
Load Files
Statements and Global Variables
Packages and Classes

The application maybe one or more of files.

Using Many Source Code Files

To include another source file in the project, just use the load command.


Load  "filename.ring"


The Load command is executed directly by the compiler in the parsing stage


if you don’t know the file name until the runtime, or you need to use functions to get the file path, just use eval().


# File : Start.ring

Load "sub.ring"

# File : sub.ring

func sayhello cName
        see "Hello " + cName + nl