[futurebasic] Re: Stuff

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: tedd <sperling@...>
Date: Sun, 23 Nov 1997 12:33:39 -0500
>Is there a quick, one command way of changing the sign of a number... say
>from 102.092 to -102.092?


Hi:

Here's my solution.

LOCAL FN changeSign(x!)
   SELECT CASE x!
       CASE < 0
          x! = x! * -1
       CASE > 0
          x! = x! * -1
       CASE = 0
          x! = x! * -1
   END SELECT
END FN x!

Or the short solution:

   x! = -x!

:-)

tedd

_____________________________________________________________________
tedd f. sperling                       <mailto:sperling@...>
                                     http://www.sojourn.com/sperling/