Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Variables name issues with the the DBPro GitHub version

Author
Message
Wizard007
8
Years of Service
User Offline
Joined: 21st Oct 2015
Location: Lisbon
Posted: 29th Sep 2016 13:41
I tested the DBPro GitHub version and when compiling my project I got variable name issues that I don't got before, anyone else experience this?
James H
16
Years of Service
User Offline
Joined: 21st Apr 2007
Location: St Helens
Posted: 29th Sep 2016 17:45
It helps if you describe what kind of issues buddy, better still provide a small snippet with said issues that we can compile for ourselves
Wizard007
8
Years of Service
User Offline
Joined: 21st Oct 2015
Location: Lisbon
Posted: 29th Sep 2016 23:37 Edited at: 29th Sep 2016 23:46
Is not the best example, but I have not find a best small snipped at the moment.

It gives this error:
Variable "angle_diff1" name is not valid at line 1.

If I remove the function it works, or if I change the variable name to angle_diff_1 it works, seems there is some conflict.
Is possible to declare the variable and it runs fine in this example, but in my project even declaring variables it have a weird behave sometimes, it don't occurred before on the older version.
Attila
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 17th Aug 2004
Location:
Posted: 30th Sep 2016 13:29
it seems that function names and variable names cant be the same (which makes sense).
In line 1 you try to assign the value 1 to the function or so it seems to DB pro. But anyway it is problematic to use variables and functions with such similar naming. This reduces the readability of the code.

kind regards
Wizard007
8
Years of Service
User Offline
Joined: 21st Oct 2015
Location: Lisbon
Posted: 30th Sep 2016 14:28
The variable and the function don't have the same name.

Other example:


This now gives this error:
Types '1' and 'TEMP2' are incompatible at line 3.
Wizard007
8
Years of Service
User Offline
Joined: 21st Oct 2015
Location: Lisbon
Posted: 30th Sep 2016 14:37
Cheeking some of the errors on my project seems the compiler now acts weird with variables and functions with numbers or underscores on the name, entering in conflict with others functions names or default program functions, this don't occurred before.

Login to post a reply

Server time is: 2024-04-19 17:03:05
Your offset time is: 2024-04-19 17:03:05