XIncludeFile in a module

Just starting out? Need help? Post your questions and find answers here.
Nero
New User
New User
Posts: 8
Joined: Sat Apr 23, 2011 6:17 pm

XIncludeFile in a module

Post by Nero »

Hiho,

If you include a file with XIncludeFile in your main source and then try to do the same in a modul it wont work.

test.pbi

Code: Select all

Structure Test
  a.l
EndStructure
test.pb

Code: Select all

XIncludeFile "./test.pbi"

abc.Test 

DeclareModule MyModul
  XIncludeFile "./test.pbi"
EndDeclareModule

Module MyModul
  defg.Test  
EndModule
But shouldn't this work because the modul is a seperated code block?

Mfg Nero
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: XIncludeFile in a module

Post by Fred »

No, XIncludeFile ensures you include your file once and only once in the whole source. If you need your module to include this file always, just use IncludeFile.
Nero
New User
New User
Posts: 8
Joined: Sat Apr 23, 2011 6:17 pm

Re: XIncludeFile in a module

Post by Nero »

Fred wrote:No, XIncludeFile ensures you include your file once and only once in the whole source.
Ah thanks for the info. I just thought it should work because the module is seperated from the other code :oops:
Post Reply