Android Question Code module knows some variables of the main module, some not

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

strange. In basis.pas, line 166, thoe compiler does not know the variable "main.prot". But in all the lines above there are lots of "main.*" variables. And all of them are global.

Can someone help?

Thank you
 

Attachments

  • try.zip
    101.2 KB · Views: 121

Straker

Active Member
Licensed User
Longtime User
I couldn't try your code (to many addictional libraries I miss). If in line 160 I write Main. teh IDE shows also 'prot' in the list of availabe instances.
Can you post the compiler's error ?
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
It is because you use Main.prot in the catch.
Try to change it to "log(Main.prot.get(0))".

I can't try because I have an older version of b4a.


This is not true!

I have tried using

dim A as int = 1 / 0

waiting for an error, but B4A does not raise an error, it set A = 2147483647 !!!


[Main.prot.Add("ciao") works well, but in my test, as I wrote i can't try your project]
 
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
Parsing code. 0.16
Compiling code. Error
Error compiling program.
Error description: Unknown member: prot
Occurred on line: 167
Main.prot.Add (s)
Word: prot

Reproducable on 2 machines.

I could find a workaround, but this is a fairly complex program and should compile reliably :)
 
Upvote 0
Top