luke2012 Well-Known Member Licensed User Longtime User Jun 12, 2013 #1 Hi to all, it's possible to declare an array (ex. Dim MyArr () As String) within "Process Global" and than size and use it in other Activities? Example *** Activity Main *** Sub Process_Globals Dim MyArr () As String end sub *** Activity MyActivity *** sub MySub () Dim MyArr (10) MyArr (0) = "value" end sub My target is to share the array with all the activities of my app.
Hi to all, it's possible to declare an array (ex. Dim MyArr () As String) within "Process Global" and than size and use it in other Activities? Example *** Activity Main *** Sub Process_Globals Dim MyArr () As String end sub *** Activity MyActivity *** sub MySub () Dim MyArr (10) MyArr (0) = "value" end sub My target is to share the array with all the activities of my app.
thedesolatesoul Expert Licensed User Longtime User Jun 12, 2013 #2 Any variable in process globals can be accessed in all modules. You have to access it with the module name though. For e.g. Main.MyArr Upvote 0
Any variable in process globals can be accessed in all modules. You have to access it with the module name though. For e.g. Main.MyArr
luke2012 Well-Known Member Licensed User Longtime User Jun 12, 2013 #3 Thanks for the reply. My doubt is about "Dim MyArr (10)" statement. I must change from "Dim MyArr (10)" to "Dim Main.MyArr (10)" ? It make sense? Upvote 0
Thanks for the reply. My doubt is about "Dim MyArr (10)" statement. I must change from "Dim MyArr (10)" to "Dim Main.MyArr (10)" ? It make sense?
thedesolatesoul Expert Licensed User Longtime User Jun 12, 2013 #4 luke2012 said: Thanks for the reply. My doubt is about "Dim MyArr (10)" statement. I must change from "Dim MyArr (10)" to "Dim Main.MyArr (10)" ? It make sense? Click to expand... I believe so (I cant remember and not at my PC to try it). Upvote 0
luke2012 said: Thanks for the reply. My doubt is about "Dim MyArr (10)" statement. I must change from "Dim MyArr (10)" to "Dim Main.MyArr (10)" ? It make sense? Click to expand... I believe so (I cant remember and not at my PC to try it).
luke2012 Well-Known Member Licensed User Longtime User Jun 12, 2013 #5 I tried it but doesn't work. So my target is to resize the array that is declared as Process Global. In the statment "dim Main.MyArr (10)" I got the error : Error Parsing Program Unknown Type MyArr Are you missing a library reference? Upvote 0
I tried it but doesn't work. So my target is to resize the array that is declared as Process Global. In the statment "dim Main.MyArr (10)" I got the error : Error Parsing Program Unknown Type MyArr Are you missing a library reference?
Erel B4X founder Staff member Licensed User Longtime User Jun 13, 2013 #6 You will need to write it this way: Code: Copy Dim a(10) As String Main.MyArr = a Upvote 0
luke2012 Well-Known Member Licensed User Longtime User Jun 13, 2013 #7 It's possible to use a list instead of Array ? Upvote 0