Qbasicnews.com
April 08, 2020, 11:19:35 AM
 Welcome, Guest. Please login or register. 1 Hour 1 Day 1 Week 1 Month Forever Login with username, password and session length
 Home Help Search Login Register
 Pages: 1 2 [3]
 Author Topic: Greater & Less Than  (Read 8772 times)
anarky
Been there, done that

Posts: 1231

The Blobworld Comics King

 « Reply #30 on: April 28, 2006, 04:46:37 AM »

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.
 Logged

Screwing with your reality since 1998.
na_th_an
*/-\*

Posts: 8244

 « Reply #31 on: May 04, 2006, 06:57:46 AM »

Who knows? We still don't know what the guy wants to do.
 Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
anarky
Been there, done that

Posts: 1231

The Blobworld Comics King

 « Reply #32 on: May 04, 2006, 08:33:57 AM »

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...
 Logged

Screwing with your reality since 1998.
na_th_an
*/-\*

Posts: 8244

 « Reply #33 on: May 04, 2006, 09:31:10 AM »

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.
 Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
anarky
Been there, done that

Posts: 1231

The Blobworld Comics King

 « Reply #34 on: May 04, 2006, 09:32:20 AM »

Something like that, I think.
 Logged

Screwing with your reality since 1998.
Agamemnus
x/ \z

Posts: 3491

 « Reply #35 on: May 07, 2006, 10:23:36 PM »

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.
 Logged

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.
 Pages: 1 2 [3]
Jump to: