Menu

Libraries and functions

Teln0

With graphical machine, libraries take the form of.vlib files, and source files of.vd files.
The sectors separate the different functions in both cases, the key word is'SECT', with no space at the end or at the end of the previous line.
The only difference is in the first instruction of the first sector,
so in a test.vd file, we will do:

(...code)
SECT
plx 5 5 5 255 255
SECT
(...code)

and to execute it we will do:

in test.vd (sector index)

In a test.vlib file, we will do:

(...code)
SECT
test.sector
pxl 5 5 5 255 255
SECT
(...code)

and to execute it, we will do:
include test.vlib
exeil test.sector

To make this easier, there are some conventions:
the sectors included must be called:
(name of the file). (name of the sector)

the temporary variables used must be called:
(file name).(sector name).(variable name)
and must always be deleted at the end of the sector.

If a sector needs arguments, they should be called:
arg1
arg2
arg3
arg4
etc....

If a sector must return a value, it will do so in a variable called "return".

If several libraries belong to a collection, a special library called init must contain a sector named (name of the collection).init which must include all the other libraries in the collection.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.