QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: MarcoPajotter on July 04, 2018, 06:24:17 am
-
Hello all,
I use QB64 to convert an old QB45 program to new windows environment.
All steps are debugged but now I receive the next message
'cannot convert expression type to symbol'
how can I debug this one ?
and where to look ?
thanks,
marc
-
Hi Marco. May I call you Marco?
First thing, welcome to the Forum. I hope that your time with us will be helpful for all.
I think the best way to help you with your problem would be to provide us with a sample of the code you are using.
Cheers.
J
-
Welcome Marco,
Bummer when there is no line number with the error message...
You know expressions are like the stuff on the right side of equals sign.
And you know symbols are one or two or a few characters to represent usual a type of variable but also some binary functions but the error message is talking about a type,
you might get such a message for
x% = "I am a string not an integer!"
or
x$ = 1 + 2
Show the code and the error could likely be spotted immediately (unless huge amount).
-
OK so modify has a timer in editor too! curses foiled again!
Hi Marco,
So the above error producing lines I offered are being caught in IDE, red-lined! Are you using the QB64 IDE Marco?
If the code is old and working QB45, maybe there is a type symbol in QB45 not compatible with QB64, a place to start looking?
Are you declaring any TYPE in your code?
-
Hello,
thanks for helping me with my problem ...
my program is about 5000 lines long,
what I did is cutting lines one by one,
first all lines I did not needed in my main base program ...
Then line by line, and still had the error message,
No red colored lines in the source to see ...
Till there was only 50 lines of my declarations left ...
and after cutting them again on by one, I found this error
COMMON SHARED DocNr() AS STRING * 4
I changed this in ...
DIM SHARED DocNr(1) AS STRING * 4
And Yes Yes Yes, it works OK
I lost some hours but I learned a lot ...
greetings,
marco
-
Sounded like a LOT of work. Glad it worked out ok for you.
J
-
Hi Marco,
Interesting problem, my editor won't let me write
DIM a() as string * 4
It always removes the ()'s.
Be careful, if you actually did need COMMON for the array.
My editor allows this:
but that might
not be good either
?
DocNr(1) = "Doc1"
-
Modify the above, that might not be good either!