07-21-2008, 8:31 PM
|
wasuplee123
Joined on 06-04-2008
Posts 8
|
Defining global variables that span multiple units
|
 
 
|
|
|
I was wondering how I can define variables that can be shared across multiple units...
These are the units I have:
=========
Main.nuva
-----------
file("My_Functions.nuva", type = Using)
end file
file("Info.pas.nuva", overwrite = true)
target = SchemaName ~ '_Info.pas'
end file
=========
I would like to assign a value to a variable in My_Functions.nuva and be able to read/use it in Info.pas.nuva. It doesn't matter where the variable is defined (either Main.nuva or My_Functions.nuva), as long as My_Functions.nuva can write to it and Info.pas.nuva can read it.
--
I noticed that I can use the System.Runtime.Config variable like this (and it works between units):
System.Runtime.Config.MyTest = "abc";
However this seems to only work for strings... when I try this line, it gives an error message:
System.Runtime.Config.MyTest = System.List.StringList();
--
By the way the "type = using" I copied from another place, without understanding what it is, and it might not actually be what I want.
|
|
|
|
|
Report
|
|
|
|