Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v3:int [2023/05/30 19:07] – [INT] neilsv3:int [2023/08/22 13:32] (current) – [FLOOR] neils
Line 1: Line 1:
-====== INT ======+====== FLOOR ======
  
-The ''INT()'' function returns the integer part of a floating point value, also as a floating point number.+The ''FLOOR()'' function returns the integer part of a floating point value, also as a floating point number.
  
 +<adm note>
 +The function is equivalent to CBM BASIC's ''INT()'' function. However, it has a different name in XC=BASIC due to conflict with the ''INT'' keyword.
 +</adm>
 ===== Function header ===== ===== Function header =====
  
-  DECLARE FUNCTION INT AS FLOAT (num AS FLOAT) SHARED STATIC INLINE+  DECLARE FUNCTION FLOOR AS FLOAT (num AS FLOAT) SHARED STATIC INLINE
  
 ===== Example ===== ===== Example =====
  
-  PRINT INT(3.14159) : REM outputs 3+  PRINT FLOOR(3.14159) : REM outputs 3
  
 <adm note> <adm note>
 To convert a floating point number to integer type, see [[v3:cint|]]. To convert a floating point number to integer type, see [[v3:cint|]].
 </adm> </adm>