Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Greater & Less Than
#31
I only skimmed over all the code posted here, but may I suggest using an array, also. But introduce letters.

Correct me if I'm wrong but smart use of the SWAP command may be an idea.
Screwing with your reality since 1998.
Reply
#32
Who knows? We still don't know what the guy wants to do.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#33
I do. except I don't know the best way around it.

It's essentially a card shuffler. But the only way I can think of how to do it is using a formula similar to 1=14...

Thus:
1 14 27 40 Row 1
2 15 28 41 Row 2
3 16 29 42 Row 3
4 17 30 43 Row 4
5 18 31 44 Row 5
6 19 32 45 Row 6
7 20 33 46 Row 7
8 21 34 47 Row 8
9 22 35 48 Row 9
10 23 36 49 Row 10
11 24 37 50 Row 11
12 25 38 51 Row 12
13 26 39 52 Row 13
...where row 13 is higher in value than row 12, yet 51 > 13.

See where I'm heading?
He's not working on absolute values. He's working on the value per row.

I hope this is what you're after...
Screwing with your reality since 1998.
Reply
#34
So he has 52 values and has to arrange them in that order? Or do you want a formula which, given a value, tells you in which row it is?

In such case, "(value MOD 13) + 1" will give you what you are looking for...

I still don't get it.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#35
Something like that, I think.
Screwing with your reality since 1998.
Reply
#36
Ummmm ok for the first post, what he says is this:

1) He has a set of numbers from 1 to 52, although he doesn't tell us how many, if there are duplicates, how they are generated, etc..

2) Then he wants it to be sorted into sets of 4 numbers each, where each set has all the numbers greater than the previous set. Except the problem is that this is not possible to achieve all the time.

...Unless (as a basic example, there are others, but this is the base):

* the quantity of the number set is divisible by 4.
* the numbers go from 1, 1+1, 1+2, 1+3... to X, where X is the quantity of the set.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)