INT/de

(Difference between revisions)
Jump to: navigation, search
m (1 revision)
((**COPIED FROM ENGLISH PAGE**) =)
Line 1: Line 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span> =
+
= <span class="f_Header">Funktion</span> =
  
Returns the integer part of a single or double.
+
Gibt den Ganzzahl-Anteil (Integer part) einer Single oder Double Zahl zurück.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Revision as of 23:05, 2 March 2013

Contents

Funktion

Gibt den Ganzzahl-Anteil (Integer part) einer Single oder Double Zahl zurück.

 

 

Syntax

var = INT( source )

 

 

Remarks

Var

A numeric variable that is assigned with the integer of variable source.

Source

The source variable to get the integer of.

 

The fraction is the right side after the decimal point of a single.

The integer is the left side before the decimal point.

 

1234.567 1234 is the integer part, .567 is the fraction

 

 

See Also

FRAC , FIX , ROUND

 

 

Example


'-----------------------------------------------------------------------------------------
'name : round_fix_int.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : demo : ROUND,FIX
'micro : Mega48
'suited for demo : yes
'commercial addon needed : no
'-----------------------------------------------------------------------------------------
 
$regfile = "m48def.dat" ' specify the used micro
$crystal = 4000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
Dim S As Single , Z As Single
For S = -10 To 10 Step 0.5
Print S ; Spc(3) ; Round(s) ; Spc(3) ; Fix(s) ; Spc(3) ; Int(s)
Next
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language