ROUND/de

(Difference between revisions)
Jump to: navigation, search
(Remarks)
(See Also)
Line 44: Line 44:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">See Also</span> =
+
= <span class="f_Header">Siehe auch</span> =
  
 
[[INT]]&nbsp;,&nbsp;[[FIX]]&nbsp;,&nbsp;[[SGN]]
 
[[INT]]&nbsp;,&nbsp;[[FIX]]&nbsp;,&nbsp;[[SGN]]

Revision as of 22:56, 2 March 2013

Contents

Funktion

Gibt den gerundeten Wert zurück.

 

 

Syntax

var = ROUND( x )

 

 

Anmerkungen

var

Single oder Double Variable der der gerundete Wert von x zugewiesen wird.

x

Single oder Double Zahl die gerundet werden soll.

 

Round(2.3) = 2 , Round(2.8) = 3

Round(-2.3) = -2 , Round(-2.8) = -3

 

 

Siehe auch

INT , FIX , SGN

 

 

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