Feb 16, 2004 #1 ganjass Technical User Joined Dec 30, 2003 Messages 154 Location GB CR9 HI All Is there a function that can detect the sign of a variable, ie +ve or -ve. cheers
Feb 16, 2004 #2 bdreed35 Programmer Joined Mar 2, 2003 Messages 1,549 Location US I am not sure of a funciton, but you could easily write a formula that you could turn into a custom function. Try something like this: @Detect_The_Sign Code: if {table.number} >= 0 then "Positive" else "Negative" Of course you can change this to return what ever kind of value you need for your situation. ~Brian Upvote 0 Downvote
I am not sure of a funciton, but you could easily write a formula that you could turn into a custom function. Try something like this: @Detect_The_Sign Code: if {table.number} >= 0 then "Positive" else "Negative" Of course you can change this to return what ever kind of value you need for your situation. ~Brian
Feb 16, 2004 1 #3 Naith Programmer Joined May 14, 2002 Messages 2,530 Location GB What you are trying to do is called finding the signum value. The Crystal function sgn does this. Upvote 0 Downvote