As RoutineBot uses FastScript as script engine, there are 2 restrictions:
1. If you use units in you project, you must use quoted names in uses-decalartion.
E.g. in PascalScript these syntax is invalid:
uses unit1;
instead use syntax
uses 'unit1';
2. Unit structure must be same as default script. E.g. in pure Pascal structure of unit is
Unit unitname;
interface
function, procedures,constant and other declarations
implementation
realization of function and procedures declared in interface section
end.
In PascalScript you must use these syntax for units
function unitfunction1 : integer;
begin
realization of unitfunction1
end;
function unitfunction2 : string;
begin
realization of unitfunction2
end;
procedure unitprocedure3;
begin
realization of unitprocedure3
end;
begin
initialization io unit
end.
Here you can download example unit.
Leave a Reply