xHarbour Reference Documentation > Operator Reference xHarbour Developers Network  

/

Division operator (binary): divides numeric values.

Syntax

<nNumber1> / <nNumber2>

Arguments

<nNumber1>
<nNumber1> is the dividend.
<nNumber2>
<nNumber2> is the divisor.

Description

This operator returns the division of <nNumber1> by <nNumber2> as a numeric value.

Info

See also:%
Category: Mathematical operators , Operators
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows the use of the "/" operator:

   PROCEDURE Main
      ?  3 / 3                         // result: 1
      ?  3 /-2                         // result: -1.50
      ? -3 / 2                         // result: -1.50
      ? -3 /-2                         // result: 1.50
      ?  3 / 0                         // result: 0
   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe