Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Calculate the smaller value between many variables

Author
Message
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 31st Oct 2010 20:37
Hi, do you know how I can calculate the smaller value between an unknown number of variables ? I can make an array but I don't know how calculate the smaller value

Thanks a lot

Eternal suffering ...

I'm french
bergice
19
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 31st Oct 2010 20:39
What do you meaan by the smaller value?

51fa1db0ec7c4af52d93a6f5d0e86bc5


Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 31st Oct 2010 20:41
I have many avriables that has values, for example : a=124; b=468; c=348 ... z=12 .

I would want calculate the smaller, in my example "z" is the smaller

Eternal suffering ...

I'm french
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 31st Oct 2010 20:45
If they are not part of an array, i think you would have to check each one against the others. :/

Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 31st Oct 2010 20:49
I can make an array to list them, there is a solution to calculate the smaller value of an array, no ? I can't do this manually, I have hundreds of values

Eternal suffering ...

I'm french
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 31st Oct 2010 21:07
I guess you could, but then you'd still have to reference each array item to each variable, if that makes sense?

Could you put this into context for us so we can better understand the problem?

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 31st Oct 2010 21:39
Individual variables:


Array:


Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 31st Oct 2010 22:11
Thanks, I think I can continue

Eternal suffering ...

I'm french

Login to post a reply

Server time is: 2026-07-22 04:37:05
Your offset time is: 2026-07-22 04:37:05