Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help me!
#22
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.

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
Reply


Messages In This Thread
help me! - by Janesh - 09-23-2003, 08:07 PM
help me! - by RST - 09-23-2003, 08:19 PM
help me! - by Janesh - 09-23-2003, 08:21 PM
help me! - by Janesh - 09-23-2003, 08:27 PM
help me! - by toonski84 - 09-23-2003, 08:54 PM
help me! - by Janesh - 09-23-2003, 10:16 PM
help me! - by whitetiger0990 - 09-23-2003, 10:36 PM
help me! - by Janesh - 09-23-2003, 11:01 PM
help me! - by Mango - 09-23-2003, 11:14 PM
help me! - by Moneo - 09-24-2003, 06:36 AM
help me! - by Janesh - 09-24-2003, 08:45 AM
help me! - by Janesh - 09-24-2003, 08:46 AM
help me! - by Moneo - 09-24-2003, 09:09 AM
help me! - by Janesh - 09-24-2003, 10:11 AM
help me! - by Mango - 09-24-2003, 12:09 PM
help me! - by Janesh - 09-24-2003, 12:39 PM
help me! - by oracle - 09-24-2003, 01:11 PM
help me! - by Mango - 09-24-2003, 06:24 PM
help me! - by Moneo - 09-26-2003, 09:03 AM
help me! - by Janesh - 09-26-2003, 10:50 AM
help me! - by Mango - 09-26-2003, 11:29 AM
help me! - by toonski84 - 09-26-2003, 11:50 AM
help me! - by Janesh - 09-26-2003, 01:24 PM
help me! - by Moneo - 09-28-2003, 06:59 AM
help me! - by seph - 09-28-2003, 08:32 AM
help me! - by seph - 09-28-2003, 08:36 AM
help me! - by oracle - 09-29-2003, 03:51 AM
help me! - by seph - 09-30-2003, 12:03 AM
help me! - by oracle - 09-30-2003, 02:55 AM
help me! - by Moneo - 10-05-2003, 06:38 AM
help me! - by Ninkazu - 10-05-2003, 07:57 AM
help me! - by na_th_an - 10-05-2003, 04:54 PM
help me! - by seph - 10-05-2003, 09:39 PM
help me! - by Ninkazu - 10-05-2003, 10:45 PM
help me! - by wildcard - 10-05-2003, 10:50 PM
help me! - by seph - 10-05-2003, 11:13 PM
help me! - by wildcard - 10-05-2003, 11:17 PM
help me! - by seph - 10-06-2003, 01:50 AM
help me! - by wildcard - 10-06-2003, 02:17 AM
help me! - by Ninkazu - 10-06-2003, 02:31 AM
help me! - by seph - 10-06-2003, 02:57 AM
help me! - by wildcard - 10-06-2003, 03:18 AM
help me! - by oracle - 10-06-2003, 04:06 AM
help me! - by relsoft - 10-06-2003, 11:44 AM
help me! - by oracle - 10-07-2003, 12:38 AM
help me! - by relsoft - 10-07-2003, 11:19 AM
help me! - by Blitz - 10-07-2003, 01:03 PM
help me! - by TheBigBasicQ - 10-08-2003, 09:31 PM
help me ! - by dadsherm - 12-19-2003, 08:03 PM
help me! - by TheBigBasicQ - 12-19-2003, 08:11 PM
help me! - by Agamemnus - 12-20-2003, 09:25 AM
help me! - by eric - 01-10-2004, 09:37 PM
help me! - by Agamemnus - 01-10-2004, 09:46 PM
help me! - by toonski84 - 01-10-2004, 10:09 PM
Janesh - by dadsherm - 01-11-2004, 07:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)