/. - Integer division

Top  Previous  Next

Syntax

<result> := (<dividend> /. <divisor>)

Parameters

<dividend>

 

The value to be divided by <divisor>.

 

<divisor>

 

The value to divide <dividend> by.

Resulting Code

This macro resolves to the division of <dividend> by <divisor> and the truncation of decimal places in the resulting value. Brackets must be used as shown.

Description

The /. macro is resolved to Int(<dividend>/<divisor>). It can be used to substitute the division C applies to integer values.

Classification

Core

Category

C compatibility macros

Quick Info

Library: cckptcor.lib / cckptcor.dll

Header: cmacros.ch

Example

 

#INCLUDE "CockpitCoreLibs.ch"

#INCLUDE "cmacros.ch"

 

FUNCTION Main

 

* This will display the value 2

? (5 /. 2)

 

RETURN NIL