KiXtart Language Reference (Cint)

[ KiXtart  VBScript  Batch  AutoIt  HTA  PowerShell  Windows Command Lines  Other Command Line Utilities  ]


Cint  (Function)

Available from version 4.1 through the latest release.

Syntax
CInt (<expression>)

Description
Converts an expression into a Variant of subtype Integer

Example
Cint(.5)  ; returns 0
Cint(1.2) ; returns 1
Cint(1.5) ; returns 2
Cint(1.7) ; returns 2

Remarks
CInt differs from the Fix and Int functions (which truncate instead of round the fractional part of a number). When the fractional part is exactly .5, the CInt function always rounds it to the nearest even number.

Also see:
Abs  CDbl  Val  CStr  Round  Int  Fix  Rnd  SRnd  DecToHex  FormatNumber  ASC  


 
Have a correction, addition or suggestion on this? Please let us know!
Last Edited: 4/24/2005. This page has been viewed 3424 times. Unless otherwise specified, all information is (C) 2004-2007 iTripoli, Inc. All Rights Reserved.

Note: you can view this information right within ASE by right clicking any keyword and selecting "Help..."


Now In Print! 496 Pages of detail covering each and every command. Includes common problems, command alternatives and real-world examples throughout.
 
Click here for special 35% discount!



iTripoli prides itself on providing top notch customer service

Find answers or open a ticket to ask directly, when opening a ticket we will suggest relavant articles to help you get answers as quickly and accurately as possible. Visit our support center now!

Please visit our full support center to find answers quickly or submit questions or feedback.