gettingstarted
[Top] [All Lists]

Re: which operator?

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: which operator?
From: Terry Ford <tmford at shaw dot ca>
Date: Mon, 31 Jul 2006 20:25:50 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <20060801030406 dot 24902 dot qmail at web60417 dot mail dot yahoo dot com> <44105B6D-6F77-40CB-A21E-429B6415C2A3 at shaw dot ca>

On Jul 31, 2006, at 8:10 PM, Terry Ford wrote:


On Jul 31, 2006, at 8:04 PM, Lennox Jacob wrote:

Hello,
Which operator is used to give the numerical value (without sign) of an integer?
(e.g. +6 returns as 6, -6 returns as 6)

Abs  (Absolute)

From the OLR:

Dim d as Double
d=Abs (23.9) //returns 23.9
d=Abs(-23.9) //returns 23.9

To add to what I said:

It's the Abs Function which isn't an operator. This has to do with the syntax in how it's called.

You could also replace d As Double with d As Integer if you wish to ignore the fractional part.
The result in the example would be 23 instead of 23.9.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>