Qbasicnews.com
Bug Reports - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: General (http://qbasicnews.com/newforum/forum-6.html)
+--- Forum: General/Misc (http://qbasicnews.com/newforum/forum-18.html)
+--- Thread: Bug Reports (/thread-5202.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30


Bug Reports - Jofers - 12-08-2004

Hmm.. you can make two variables of the same name in QB. Just make them different types. You can even have an integer, and an integer array with the same name and it doesn't care. That's not really a bug, and it might have been mentioned or addressed. Either way, it's worth mentioning. Twice if it's already mentioned, I'm a lazy bastard and don't look this up.

Is there something like bugzilla to manage all this or is it kind of pointless with one developer? Seriously dude, I wish I could help develop if I didn't suck Smile I've said that before with making a normal compiler Big Grin


Bug Reports - v3cz0r - 12-08-2004

Code:
a$ = "123"
a% = 123
a! = 123.0
a# = 123.0

dim b%(10), b!(10)

b%(1) = 123
b!(2) = 123
b$ = "123"

All allowed.

Accessing undeclared arrays isn't tho - that's one of the first causes of bugs.. foo baa(a) "hmm, why isn't working, wait, it's "bar", QB just allocated a dummy array for me.." etc

Bugs can be reported at sourceforge: http://sourceforge.net/tracker/?group_id=122342&atid=693196 , would make things easier.


Bug Reports - Jofers - 12-08-2004

What about:
dim a(4) as integer
dim a as integer

I get
my.bas(2) : error 4: Duplicated definition

QB doesn't give a rat's behind.
version .04b though.


Bug Reports - Z!re - 12-08-2004

Why doesent FB allow:

Code:
dim a as integer

a% = 100


And wouldnt a%, a!, a# aso, mean that:
Code:
dim a as integer
dim a as single
dim a as [...]
Isnt that just silly?

And since I cant do:
Code:
dim a as single

a! = 100

How would I make the single type var a = 100, and the integer type var = some other value?

a% ?

What about option explicit?

problems problems..


Bug Reports - adosorken - 12-08-2004

I personally find it bad coding practice to use the same variable name for different types, but that's just me.


Bug Reports - Jofers - 12-08-2004

Oh yeah, me too. But I was playing around with "Dark woods 2" for a few minutes today, and it seemed like something worth pointing out.

I probably won't spend too much time porting it. I'm pretty sure it will go down as the most LINE()-() filled text game ever programmed.


Bug Reports - CGI Joe - 12-08-2004

Quote:Why doesent FB allow:
And wouldnt a%, a!, a# aso, mean that:
Code:
dim a as integer
dim a as single
dim a as [...]
Isnt that just silly?

You can't do that in QB.


Bug Reports - Z!re - 12-08-2004

I know, thats my point.

So why allow:
a%
a!
a$
a&
[...]



And you cant remove the middle of my post and change the meaning of it.
Read my entire post.

The first code statement was a question, the next ones were facts.


Bug Reports - CGI Joe - 12-08-2004

I read your entire post and it didn't make any sense.


Bug Reports - Z!re - 12-08-2004

Having different variables, named the same but of different types

Makes no sense, as FB doesent allow, for example:

Code:
dim a as single

a! = 10.324982  'single, the one dimmed
a = 219832  'integer

Having multiple variables with the same name/diff type is the same as doing:

Code:
dim a as integer
dim a as single
dim a as string
It makes no sense.



And why doesent FB allow:
Code:
dim a as integer
a% = 100
But fail on the %?


Hope its more clear now.