SQR/de

From MCS Wiki AVR
< SQR(Difference between revisions)
Jump to: navigation, search
m (1 revision)
(Example)
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span> =
+
= <span class="f_Header">Funktion</span> =
  
Returns the Square root of a variable.
+
Gibt die Quadratwurzel einer Zahl zurück.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
Line 15: Line 15:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Remarks</span> =
+
= <span class="f_Header">Anmerkungen</span> =
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 
{| width="539" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="539" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
Line 23: Line 23:
  
 
| valign="top" width="100%" style="width: 442px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 442px; border: 1px solid rgb(0, 0, 0);" |  
A numeric single or double variable that is assigned with the SQR of variable source.
+
Numerische Single oder Double Variable der die Quadratwurzel der Variablen source zugewiesen wird.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 30: Line 30:
  
 
| valign="top" width="100%" style="width: 442px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 442px; border: 1px solid rgb(0, 0, 0);" |  
The single or double variable to get the SQR of.
+
Die Single oder Double Variable aus der die Quadratwurzel gebildet wird.
  
 
|}
 
|}
Line 36: Line 36:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
When SQR is used with a single, the FP_TRIG library will be used.
+
Wenn SQR mit einer Single-Variablen benutzt wird dann wird die FP_TRIG library benutzt.
  
When SQR is used with bytes, integers, words and longs, the SQR routine from MCS.LBX will be used.
+
Wenn SQR mit Byte-, Integer-, Word- oder Long-Zahlen benutzt wird dann wird die MCS.LBX benutzt.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
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> =
  
 
[[POWER]]
 
[[POWER]]
Line 52: Line 52:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
= <span class="f_Header">Example</span> =
+
= <span class="f_Header">Beispiel</span> =
  
 
<br/><source lang="bascomavr">
 
<br/><source lang="bascomavr">
$regfile = "m48def.dat" ' specify the used micro
+
$regfile = "m48def.dat" ' Mikrocontroller
$crystal = 8000000 ' used crystal frequency
+
$crystal = 8000000 ' Taktfrequenz
$baud = 19200 ' use baud rate
+
$baud = 19200 ' Baudrate
 
$hwstack = 32 ' default use 32 for the hardware stack
 
$hwstack = 32 ' default use 32 for the hardware stack
 
$swstack = 40 ' default use 10 for the SW stack
 
$swstack = 40 ' default use 10 for the SW stack
Line 69: Line 69:
 
   
 
   
 
A =Sqr(A)
 
A =Sqr(A)
Print A ' prints 3.0
+
Print A ' Ausgabe: 3.0
 
B = Sqr(b)
 
B = Sqr(b)
 
Print B
 
Print B

Latest revision as of 00:59, 10 March 2013

Contents

Funktion

Gibt die Quadratwurzel einer Zahl zurück.

 

 

Syntax

var = SQR( source )

 

 

Anmerkungen

var

Numerische Single oder Double Variable der die Quadratwurzel der Variablen source zugewiesen wird.

source

Die Single oder Double Variable aus der die Quadratwurzel gebildet wird.

 

Wenn SQR mit einer Single-Variablen benutzt wird dann wird die FP_TRIG library benutzt.

Wenn SQR mit Byte-, Integer-, Word- oder Long-Zahlen benutzt wird dann wird die MCS.LBX benutzt.

 

 

Siehe auch

POWER

 

 

Beispiel


$regfile = "m48def.dat" ' Mikrocontroller
$crystal = 8000000 ' Taktfrequenz
$baud = 19200 ' Baudrate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 40 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
 
Dim A As Single
Dim B As Double
A = 9.0
B = 12345678.123
 
A =Sqr(A)
Print A ' Ausgabe: 3.0
B = Sqr(b)
Print B
End

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