| BasPas generates code, that a Pascalcompiler can understand. With Version 0.5 comes a BasPasLibrary there are two Files: The BasPasLib.lb and BasPasLib.ib This Library is generated with mlib, it
comes with the zipfile.
To make a Library you must put your Functions and Procedures in one Textfile.
Inside the Fuction or Procedure you must declare a EXMACRO name, for this name
BasPas search in your Sourcecode. The EXMACRO name must be different from the Function/Procedurename.
Example:
Function ExtractBP(ss : String;cc : String) : String
EXMACRO Extract
VAR
fcxdb : Byte
begin
fcxdb = Pos(cc,ss)
ExtractBP = LeftStr(ss,fcxdb-1)
END FUNC
In this example BasPas searched for Extract in the Basic Source,
when Extract is found the name is replaced by the Functionname.
At least the Function is put to your Basicsource.
Please don't Edit the BasPasLib ore put Functions or Procedures in. I do update this regularly.
Generate your own Libfile.
To make a new Lib, proceed as follows:
mlib Function/Proceduretext Libraryname
If no Libfile with the name exists, then a new Library is
generated. Else the Functions/Procedures are appended.
mlib Function/Proceduretext Libraryname -new
This overwrites an existing Library.
you can write mlib -help, or without Parameter, it comes a helptext.

With Version 0.6 the BasPasLib is loaded automatically.

If you donīt need any mlib generated libs, then use the -nolibs Option in the commandline

Within a LIBRARY it is necessarily that all functions are used also within other functions, first in the LIBRARY stands. That is, in the text file of mlib, the function is read must stand further above.