Order of functions

edited 4:59PM in FastScript
Hi,

I'm evaluating the scripting engine and so far, I really like it.
In our program the script will be used to calculate some difficult pharmacy problems.
The script contains some functions which operate on my own created objects.

Now I would like to have some section where I can define the functions.
Is there any possibility to have something like:

interface
function MyFunction1: aResultType;
function MyFunction2: aResultType;

implementation

function MyFunction1: aResultType;
begin
dosomething here ...
end;

function MyFunction2: aResultType;
begin
end;

I know I can order them so there will be no problem, but for the moment i'm stuck on this.
I have a function (function1) which must be implemented before some other function, but inside this function1, I need to evaluate some other function (function2) which MUST be below function1, because of the order of the functions.

Is there any solution to this? this would be very great.

Regards,
Wouter Devos

Comments

  • edited 4:59PM
    At this moment you can't use func2 from func1. There is no interface/implementation sections (they are specific to Pascal language only). I'll try to do something in the next release.
  • edited 4:59PM
    Alex,

    Thanks.

    Regards,
    Wouter Devos
  • edited 4:59PM
    I did this in FS1.5, will out soon.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.