Re: Lotto Picker (6 numbers out of 42) For 10 Tickets
- 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-
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.
> we don'tBill,
> need a DIM statement unless we have more than 11 values, OR a multi-
> dimensioned array.
a 2D array of array(10,10) is available without dimming too.
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
- 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]
- 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
----- Original Message -----
From: "pendl2megabit" <pendl2megabit@...>
Sent: Thursday, March 02, 2006 7:05 PM
Subject: AW: [libertybasic] Re: Lotto Picker (6 numbers out of 42) For 10
>> we don't
>> need a DIM statement unless we have more than 11 values, OR a multi-
>> dimensioned array.
> 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