FIX/de
(Difference between revisions)
(→See Also) |
(→Example) |
||
Line 46: | Line 46: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Beispiel</span> = |
<br/><source lang="bascomavr"> | <br/><source lang="bascomavr"> | ||
Line 59: | Line 59: | ||
$regfile = "m48def.dat" ' specify the used micro | $regfile = "m48def.dat" ' specify the used micro | ||
− | $crystal = 4000000 ' | + | $crystal = 4000000 ' Taktfrequenz |
− | $baud = 19200 ' | + | $baud = 19200 ' Baudrate |
$hwstack = 32 ' default use 32 for the hardware stack | $hwstack = 32 ' default use 32 for the hardware stack | ||
$swstack = 10 ' default use 10 for the SW stack | $swstack = 10 ' default use 10 for the SW stack |
Revision as of 22:51, 2 March 2013
Contents |
Funktion
Gibt für Zahlen über Null den nächstkleineren Wert und für negative Zahlen den nächstgrößeren Wert zurück.
Syntax
var = FIX( x )
Anmerkungen
var |
Gleitkommazahl der das Ergebnis von FIX zugewiesen wird. |
x |
Gleitkommazahl von der der FIX-Wert gebildet wird. |
Siehe auch
Beispiel
'----------------------------------------------------------------------------------------- '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 ' Taktfrequenz $baud = 19200 ' Baudrate $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 |
---|