|
dime Novice
Joined: 15 Dec 2002 Posts: 35
|
Posted: Thu Jun 12, 2003 8:08 am
negative numbers in triggers? |
for #TR {You have got (%d) practice sessions}
is there any way to have the (%d) capture negative numbers too?
You have got -5 practice sessions, and 9 spell practice sessions left.
also, a quick test..
#var a -5
#if (a<0) {#show yes} {#show no}
output: no
i'm using 6.16... |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 12, 2003 8:32 am |
Use %n for signed numbers and numbers containing commas.
#TR {You have got (%n) practice sessions}
A quick test
#VAR a -5
#IF (@a < 0) {#SHOW yes} {#SHOW no}
output: yes
@a is -5, which is less than 0. a is a which is not (letters are greater than 0).
LightBulb
Advanced Member |
|
|
|
dime Novice
Joined: 15 Dec 2002 Posts: 35
|
Posted: Thu Jun 12, 2003 3:47 pm |
i keep on forgeting the @ in if statements and never learn my lesson..
thanks |
|
|
|
dime Novice
Joined: 15 Dec 2002 Posts: 35
|
Posted: Thu Jun 12, 2003 3:47 pm |
i keep on forgeting the @ in if statements and never learn my lesson..
thanks |
|
|
|
|
|