Using many source files in the Ring programming language

Hello

Example
I have the next folder
C:\LRing
Contains the next files
C:\LRing\t1.ring
C:\LRing\mylib.ring
C:\LRing\libs\mylib2.ring

The file t1.ring contains the next code

load “mylib.ring”
load “libs\mylib2.ring”
myfunc()
test()

The file mylib.ring contains the next code

func myfunc
see “message from myfunc”+nl
the file libs\mylib2.ring contains the next code
func test
see “message from test” + nl
from the folder C:\LRing
If Ring is not added to the path you can add it or use the next commandset path=%path%;c:\ring\bin;

where c:\ring is the Ring folder

Now run

Ring t1.ring

Output

message from myfunc
message from test
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s