Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sign Of Variable 1

Status
Not open for further replies.

ganjass

Technical User
Dec 30, 2003
154
GB
CR9

HI All

Is there a function that can detect the sign of a variable, ie +ve or -ve.

cheers
 
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
 
What you are trying to do is called finding the signum value. The Crystal function sgn does this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top