#1 2016-08-15 01:44

aip1000
Member
Registered: 2016-08-15
Posts: 8

$INCLUDE directive in PascalScript rules does not seem to work

I'm trying to organize the procedures/functions in my saved PascalScript rules.
As per the info in the Pascal Scripts: Tips section of the wiki, I'm using the {$INCLUDE 'filename.inc'} directive.

To test, I tried the following script:

PascalScript Rule:

{$INCLUDE 'Common.inc' }

begin
  DoSomething(FilePath);
end.

Common.inc:

procedure DoSomething(var Parameter: WideString);
begin
  // Do something here with Parameter.
  // Original passed variable will be changed,
  // because Parameter has been passed as a Var.
  ShowMessage('DoSomething(): ' + Parameter);
end;

Compilation fails with

Pascal Script Compile:
[Line 4] Error: Unknown identifier 'DoSomething'

So it seems as if that Common.inc file is not being included. I tried specifying a fully qualified path, but that doesn't work either. The script runs fine if I copy-paste the Common.inc into the PascalScript Rule itself.

Any ideas?

Offline

#2 2016-08-15 01:52

aip1000
Member
Registered: 2016-08-15
Posts: 8

Re: $INCLUDE directive in PascalScript rules does not seem to work

Sorry, please delete. I did not know it was only in the beta. For other users, ensure you are using 6.5.0.1

Offline

#3 2016-08-15 10:32

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,479

Re: $INCLUDE directive in PascalScript rules does not seem to work

aip1000 wrote:

I did not know it was only in the beta. For other users, ensure you are using 6.5.0.1

Added a version requirement in PascalScript Tips section.

Offline

Board footer

Powered by FluxBB