Search found 3 matches

by cubragol
Fri Jan 07, 2011 2:26 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Help with routines choosing unrepeated data from an array
Replies: 4
Views: 9846

Thanks Ted I knew there must be a more elegant way.
I am so rusty.
I learned to program on a Sinclair ZX spectrum and I don't remember having access to the swap command!
Thanks again. :D
by cubragol
Fri Jan 07, 2011 9:37 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Help with routines choosing unrepeated data from an array
Replies: 4
Views: 9846

Fixed it myself

:D rather inelegant solution probably but here it is dayprogram: CLS CLEAR RANDOMIZE TIMER DIM weekday$(7) FOR a = 1 TO 7 READ weekday$(a) NEXT a DIM newlist$(3) DO WHILE z < 3 days: GOSUB daypick GOSUB daycheck IF flag = 1 THEN GOTO days IF flag = 0 THEN newlist$(z) = tempday$: z = z + 1 LOOP FOR a...
by cubragol
Fri Jan 07, 2011 7:22 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Help with routines choosing unrepeated data from an array
Replies: 4
Views: 9846

Help with routines choosing unrepeated data from an array

Hi thanks for running these boards. I am stuck trying to write a routine in a larger programme. I want to choose data randomly from an array and write it to a new array. It doesn't matter which order it arrives in as long as data is not repeated in the new array. I am not using days of the week but ...