Local/global declarations

edited June 2004 in FastScript
Would it be possible in the near future to have local/global declarations?

This is useful for open script interfaces where you allow a user to load more than one script.
Because different scripts may use same global variables and/or function names and that will cause redeclaration errors.


I mean something like this:

main.pas:
uses 'another.pas';

procedure test;
begin
  another.test('this was called from ''main.pas''!');

  // but also this
  test2('this should work, too');
end;

begin
end.


another.pas:
procedure test(Msg: String);
begin
  ShowMessage(Msg);
end;

procedure test2(Msg: String);
begin
  ShowMessage(Msg);
end;

begin
end.

Comments

Leave a Comment