Loading ...
Sorry, an error occurred while loading the content.
 

Re: Lotto Picker (6 numbers out of 42) For 10 Tickets

Expand Messages
  • William Lopez
    You could DIM test(6), ingemar, but why, unless you intend to save it for future work? Because we are only using 6 values, I didn t really intend to create an
    Message 1 of 7 , Mar 2, 2006
      You could DIM test(6), ingemar, but why, unless you intend to save it
      for future work? Because we are only using 6 values, I didn't really
      intend to create an array, just name multiple variables, and we don't
      need a DIM statement unless we have more than 11 values, OR a multi-
      dimensioned array.

      We're only creating 6 variables when we pick the numbers for each
      ticket. After each 6 numbers have been selected and checked to avoid
      repeats, all six numbers are printed to screen (or output to a file if
      you choose to do that). When we pick 6 new numbers, current picks are
      overwritten with the new picks, then printed as the new ticket.

      Instead of creating and saving several arrays, wasting memory space, I
      would output the current picks to a file, then when making picks for
      the next ticket, APPEND the new picks to the file.
    • pendl2megabit
      Message 2 of 7 , Mar 2, 2006
        >
        ---snip
        > we don't
        > need a DIM statement unless we have more than 11 values, OR a multi-
        > dimensioned array.
        >

        Bill,
        a 2D array of array(10,10) is available without dimming too.

        ---
        Stefan Pendl






        ___________________________________________________________
        Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
      • William E. Lopez
        Ahh, you are entirely correct, Stefan (as usual!). I missed that in the help file for double-dimensioned arrays. One of the reasons I did not DIM and array,
        Message 3 of 7 , Mar 2, 2006
          Ahh, you are entirely correct, Stefan (as usual!). I missed that in the help file for double-dimensioned arrays. One of the reasons I did not DIM and array, or use a double-dimmed array to hold tickets and picks, is because Dave specifically asked not to create a double-dimmed array.

          Thanks for the tip... I'm sure I'll use it again somewhere in my code - - but I'll definitely include a remark to remind myself what I am doing. LOL!


          [Non-text portions of this message have been removed]
        • Ingemar Bjerle
          I am just using the dim statement to zero the test() array. If this is not done the tickets will be dependent. For example in the first ticket you have got a 2
          Message 4 of 7 , Mar 2, 2006
            I am just using the dim statement to zero the test() array. If this is not
            done the tickets will be dependent. For example in the first ticket you have
            got a 2 and in the next you again get a 2 but now it will not be accepted
            and something else will be found. My feeling tells me that something is
            wrong. In order to be sure I will always use a dim statement after every
            ticket.
            Ingemar

            ----- Original Message -----
            From: "pendl2megabit" <pendl2megabit@...>
            To: <libertybasic@yahoogroups.com>
            Sent: Thursday, March 02, 2006 7:05 PM
            Subject: AW: [libertybasic] Re: Lotto Picker (6 numbers out of 42) For 10
            Tickets


            >>
            > ---snip
            >> we don't
            >> need a DIM statement unless we have more than 11 values, OR a multi-
            >> dimensioned array.
            >>
            >
            > Bill,
            > a 2D array of array(10,10) is available without dimming too.
            >
            > ---
            > Stefan Pendl
            >
            >
            >
            >
            >
            >
            > ___________________________________________________________
            > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            >
            >
            >
            >
            >
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.