09-26-2003, 11:50 AM
Forgive me if someone suggested this before, but your program would look cleaner and operate more efficiently with some SELECT...CASE as a logic statement.
Also, since you're spaghetti coding different assignments based on value, try this:
It'll make the code itself a whole lot less confusing if you only hardcode what you need to.
Code:
SELECT CASE variable
CASE 1
'blah
'more blah
CASE 2, 4, 6
'blah blah blah
CASE 9 TO 15
'blah
'blah blah
'blah blah blah
CASE IS < 15, "aaron" to "zxylum"
'blah blah blah
CASE ELSE
'bloopity blah blah blah
END SELECT
Also, since you're spaghetti coding different assignments based on value, try this:
Code:
DIM artists (1 to numberofartists)
DIM albums(1 to numberofalbums)
FOR x = 1 to numberofartists
READ artists(x)
NEXT x
FOR x = 1 to numberofalbums
READ albums(x)
NEXT x
INPUT "Make a selection", indexvalue
artist$ = artists(indexvalue)
album$ = albums(indexvalue)
DATA "artist", "artist1", "artist2"
DATA "album", "album1", "album2"
It'll make the code itself a whole lot less confusing if you only hardcode what you need to.
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry