Qbasicnews.com

General => General/Misc => Topic started by: steven_basic on May 04, 2005, 01:09:02 PM



Title: ENUM problem?
Post by: steven_basic on May 04, 2005, 01:09:02 PM
Code:

enum testvals
  one = 1,
  two,
  three,
  four
end enum

print one, two, three, four


The above test code outputs 1 3 5 7 instead of 1 2 3 4.

I ran across this problem when working on a simple database of objects and kept seeing odd results in the output.


Title: ENUM problem?
Post by: keeling on May 04, 2005, 01:31:00 PM
Try this (I've never seen commas in an EMU bit)

Code:
enum testvals
  one = 1
  two
  three
  four
end enum

print one, two, three, four


Title: ENUM problem?
Post by: v3cz0r on May 04, 2005, 02:08:48 PM
True, fixed.. i added the commas support in 0.13 but didn't test it, sorry.. changes are in CVS.