Qbasicnews.com
November 22, 2019, 08:51:57 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: ENUM problem?  (Read 1671 times)
steven_basic
Senior Member
**
Posts: 244


WWW
« 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.
Logged

ature has its way of warning a person away from danger:  The distinct black and white coloration on a skunk, the chilling buzz of a rattlesanke, a redneck handing you his beer and saying "Watch this!"
keeling
Forum Regular
**
Posts: 149



WWW
« Reply #1 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
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
« Reply #2 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.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!