Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pete's Dumb Idea of the Day!
#14
I'm glad to see Steve's apple crop is coming in nicely, but out out here in CA working with oranges!

For some of my apps I use arrays, for some databases, and for some I use data statements. I mentioned apples and oranges because I was using data1, data2, and data3 as labels. Steve is using three data statements followed by numbers.

TDarcos posted what I posted on the previous page, the Select Case method to use Restore.

So basically for user input routines, we can have...

Code: (Select All)

Print "Who do you wish to consult?"
Do
    Input "1) for Pete, 2) for Steve, or 3) for Past Presidents"; x
    Print
    ' So while we can't do this, so far, in QB64:  On x Restore data1, data2, data3
    ' We can do this with Select Case...
    Select Case x
        Case 0: End
        Case 1: Restore data1
        Case 2: Restore data2
        Case 3: Restore data3
        Case Else: Run
    End Select
    Do
        Read Consultant$, blurb$
        If Consultant$ = "eof" Then Exit Do
        Print Consultant$; ": "; blurb$
    Loop
    Print
Loop
data1:
Data Pete,Likes On x Restore
Data Pete,Likes stirring the pot even more!
Data eof,
data2:
Data Steve,Likes using arrays.
Data Steve,Has his own ass but prefers to ride Pete's.
Data eof,
data3:
Data President Trump,More jobs!
Data President Obama,No jobs!
Data President Clinton,Blow jobs!
Data President Biden,Nut jobs!
Data eof,

Pete
Reply


Messages In This Thread
Pete's Dumb Idea of the Day! - by Pete - 10-21-2024, 07:53 PM
RE: Pete's Dumb Idea of the Day! - by TDarcos - 10-23-2024, 02:47 AM
RE: Pete's Dumb Idea of the Day! - by CharlieJV - 10-22-2024, 12:01 AM
RE: Pete's Dumb Idea of the Day! - by dano - 10-22-2024, 01:08 AM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-22-2024, 05:55 AM
RE: Pete's Dumb Idea of the Day! - by bplus - 10-22-2024, 10:40 AM
RE: Pete's Dumb Idea of the Day! - by a740g - 10-22-2024, 11:46 AM
RE: Pete's Dumb Idea of the Day! - by Petr - 10-22-2024, 03:57 PM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 01:01 AM
RE: Pete's Dumb Idea of the Day! - by SMcNeill - 10-23-2024, 03:54 AM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 07:59 AM
RE: Pete's Dumb Idea of the Day! - by CharlieJV - 10-23-2024, 01:07 PM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 05:37 PM
RE: Pete's Dumb Idea of the Day! - by CharlieJV - 10-23-2024, 08:09 PM
RE: Pete's Dumb Idea of the Day! - by Pete - 10-23-2024, 10:29 PM



Users browsing this thread: 10 Guest(s)