Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Accessing global variable declared in other file


1 reply to this topic

margrat

margrat
  • Members
  • 7 posts

Posted 04 October 2002 - 10:35

I have 2 files
setup.rul
featureevents.rul
I have declared some boolean variables in setup.rul file.
Those variables are set in OnBegin() function.
I want to access the same variables (declared in setup.rul ) in featureevents.rul file.
How to access the same.
Is there a way to access the variables across the files.
Both the files are in same folder.

In C or C++ the same can be done by using extern.

thanks in advance

wyrdfish

wyrdfish
  • Members
  • 8 posts

Posted 07 October 2002 - 14:02

Installscript handles multiple files by including them all together.

Setup.rul has a line to #include "wibble.rul" and so on.

When you delcare a variable outside a function it should be able to be referenced in any of the files.

Dave W.