QB64.org Forum
Active Forums => QB64 Discussion => Topic started by: Ed Ferris on October 12, 2020, 03:40:17 pm
-
Hello! I just downloaded QB64 and am using it to edit a program I wrote in the Ubuntu Text Editor. (QB64 won't run on my Ubuntu since I don't have C++ and the DOS emulators I've found don't work with BASIC45.exe.) Here are some differences I found from BASIC 4.5 as I remember it:
ELSE <line number> is an error, you now have to supply ELSE GOTO <line number>
A variable declared AS STRING in a TYPE statement causes an "illegal string to numeric conversion" error when you assign a string to it later. Suffixing the name with "$" eliminates the error, but makes me wonder if the value will be stored correctly.
Forward references to line numbers that are not defined yet are flagged as errors. This is very annoying.
I'm going to get a new Chromebook and see if QB64 will actually run on it (without landing me in Dependency Hell).
Meanwhile, the editor is useful.
-
Welcome to forum Ed,
A variable declared AS STRING in a TYPE statement causes an "illegal string to numeric conversion" error when you assign a string to it later.
Forward references to line numbers that are not defined yet are flagged as errors. This is very annoying.
Show me a code snippet, these don't sound right, using QB64 v1.4?
-
Did you run the setup script?
-
Another thing I just noticed is that this webpage doesn't allow typing in the Password -- I have to copy and paste it from a text editor. Not the only page on which it has happened, but a typical example of how the Internet is breaking down. Maybe you youngsters won't believe that pages loaded faster in the 28K modem era because they didn't have FETCH commands.
The setup script gave me the error messages at "### QB64 didn't compile". When I tried to APT-GET the C++ compiler (both GCC and G++), it needed other packages, which needed other packages installed, at which point I gave up.
The editor flags forward references, but will go past them, unlike unresolved errors.
An example of the conversion error:
TYPE SWColor
SWName as string * 6
SWHex as string * 6
END TYPE
SWColor.SWName="X" gives the error.
-
An example of the conversion error:
TYPE SWColor
SWName as string * 6
SWHex as string * 6
END TYPE
SWColor.SWName="X" 'gives the error.
for this example you are missing the DIM myvariable as SWColor
you have to dim a variable to use your type before you can use it.
Example:
-
Thank you! I now remember that step was necessary.