Android Question Sub Globals in a service module ?

jinyistudio

Well-Known Member
Licensed User
Longtime User
Could i writing following code in a service module ? Because i always get a error tell me as following, Why...?:p

Sub Globals
Dim Qc As BltData
Dim bfbytes(30) As Byte
Dim bfindex As Int
End Sub
 

Attachments

  • gv.png
    gv.png
    77.6 KB · Views: 99

jinyistudio

Well-Known Member
Licensed User
Longtime User
Services do not have GLOBALS.
Hi
Could you tell how to declare a local variable in a service module and let all sub could use it in this service ?
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
The variables have to be declared on Process_Globals, if you want the variables to be accessible just to the service then make them private, like this:
B4X:
'Service module

Sub Process_Globals

    Private myVar As String

...
 
Upvote 0
Top