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

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.