VOGONS


First post, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

i just wrote a few little programs with gwbasic, and i wanted to see how much faster they would run when compiled. however bascom reported errors even though they worked without trouble in gwbasic. i looked up the manual and found that for bascom you can only dim an array with subscript being a constant, not variable! that is to say you can't do this:
10 input heapsize
20 dim heap(heapsize)
this is just terrible, because its something you can do with ease in gwbasic. till when did m$ fix this issue?

Reply 1 of 7, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

use quickbasic compiler or powerbasic/turbobasic instead of bascom perhaps?

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 2 of 7, by root42

User metadata
Rank l33t
Rank
l33t

Or maybe QuickBasic, which might be more compatible with GWBasic.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 3 of 7, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

stupid overflow problem in bascom and qb:
10 a%=32767 'a is an integer within limit
20 b#=a%*2 'b is a double float and is twice of a
30 print b#
this code has no problem running in gwbasic, but in bascom or qb it bumps a stupid "overflow", probably because a%*2 is above the limit of integer but i am transfering the value to a double. any workaround?

Reply 4 of 7, by root42

User metadata
Rank l33t
Rank
l33t

Did you try

20 b#=a%*2.0

This would maybe cast the integer to a float first, so you don't get the overflow.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 5 of 7, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

yeah integer promotion.

you need to do

b# = a%
b# = b# * 2

or try root42's answer.

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 6 of 7, by Jo22

User metadata
Rank l33t++
Rank
l33t++

What about MS PDS BASIC 7.x ? It had MBasic roots and was aimed torwards professionals.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 7 of 7, by noshutdown

User metadata
Rank Oldbie
Rank
Oldbie

bascom1.0 is extremely stupid, it gives endless "sq" errors(messed line numbers) even for a program with 3 lines, only because its saved by plain text editor and not gwbasic, which seems to add an EOF sign after the last line. the only solution is to load it in gwbasic and save again.