4D v14.3

Dec

Home

 
4D v14.3
Dec

Dec 


 

Dec ( number ) -> Function result 
Parameter Type   Description
number  Real in Number whose decimal portion is returned
Function result  Real in Decimal part of number

Dec returns the decimal (fractional) portion of number.The value returned is always positive or zero.

Example  

The following example takes a monetary value expressed as a real number, and extracts the dollar part and the cents part. If vrAmount is 7.31, then vlDollars is set to 7 and vlCents is set to 31:

 vlDollars:=Int(vrAmount` Get the dollars
 vlCents:=Dec(vrAmount)*100 ` Get the fractional part

 
PROPERTIES 

Product: 4D
Theme: Math
Number: 9

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

Int

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)