Converts an passed expression to a TYPE INTEGER point numeric value.

 

Displays the given value as an integer.  Function does not round a number with decimals, instead the value returned is the integer portion of the number.

 

Syntax:

AsInteger( AnyValue )

 

Parameter:

Description:

AnyValue

Any numeric value, Or expression that results in a numeric value.

 

Example:

'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'  BPV Manual Series Test Values
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dVal[1] = -1.50
dVal[2] = -1.00
dVal[3] = -0.50
dVal[4] =  0.00
dVal[5] =  0.50
dVal[6] =  1.00
dVal[7] =  1.50
 
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PRINT "AsInteger Function:"
PRINT "-------------------"
 
FOR Ndx = 1 TO 7
  '   Floor Calculations
  PRINT "AsInteger(" + AsString(dVal[Ndx], 2) + ") = ", AsInteger( dVal[Ndx] )
Next '   Ndx
'  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

Results:

  AsInteger Function:

  ------------------

  AsInteger(-1.50) =  -1

  AsInteger(-1.00) =  -1

  AsInteger(-0.50) =  0

  AsInteger(0.00) =  0

  AsInteger(0.50) =  0

  AsInteger(1.00) =  1

  AsInteger(1.50) =  1

 

Links:

AsFloating, AsSeries, AsString, IsFloating, IsInteger, IsString, Ceiling, Floor,

See Also:

Data Groups and Types

 


Edit Time: 9/25/2017 09:09:58 AM


Topic ID#: 45

 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software