|
Virus Wanderer
Joined: 29 Jun 2002 Posts: 69 Location: USA
|
Posted: Fri Feb 14, 2003 9:35 pm
Stumped on how to do this.... |
I need a way to put the following code into the 'value' section on a guage:
%if(a < 0 and b < 0,$c plus a plus b)
%if(a < 0 and b >= 0,$c plus a)
%if(a >= 0 and b < 0,$c plus b)
Any suggestions on how to make all three of thos situations act as 1?
Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Feb 14, 2003 10:11 pm |
%if(a < 0 and b < 0,$c plus a plus b,%if(a < 0,$c plus a,$c plus b))
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Feb 15, 2003 1:57 am |
Did you really want the string "plus"? Or do you want the operation "+" (the latter makes more sense in a gauge)?
Since both (a < 0) and (b < 0) evaluate to false, you could just use
$c
However, I'm guessing you actually meant to use "+", with variables, and have changed your variable character to $.
%eval($c %if( $a < 0, + $a)%if( $b < 0, + $b))
LightBulb
Advanced Member |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|