BINVAL/de

Aus MCS Wiki AVR
< BINVAL(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Created page with "= <span class="f_Header">Action</span> = Converts a string representation of a binary number into a number. <span style="font-family: Arial;"> </span> <span style="fon...")
 
(Example)
 
(4 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
== (**COPIED FROM ENGLISH PAGE**) === <span class="f_Header">Action</span> =
+
= <span class="f_Header">Funktion</span> =
  
Converts a string representation of a binary number into a number.
+
Wandelt die Zeichenkettendarstellung einer binären Zahl in eine Zahl um.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
Zeile 15: Zeile 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="567" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="567" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
 
| valign="top" width="13%" style="width: 70px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="13%" style="width: 70px; border: 1px solid rgb(0, 0, 0);" |  
Var
+
var
  
 
| valign="top" width="100%" style="width: 488px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 488px; border: 1px solid rgb(0, 0, 0);" |  
A numeric variable that is assigned with the value of s.
+
Numerische Variable der der Wert von s zugewiesen wird.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
 
| valign="top" width="13%" style="width: 70px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="13%" style="width: 70px; border: 1px solid rgb(0, 0, 0);" |  
S
+
s
  
 
| valign="top" width="100%" style="width: 488px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 488px; border: 1px solid rgb(0, 0, 0);" |  
Variable of the string type. Should contain only 0 and 1 digits.
+
Zeichenkettenvariable. Sollte nur die Ziffern 0 oder 1 enthalten.
  
 
|}
 
|}
Zeile 40: Zeile 40:
 
<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> =
  
 
[[STR]]&nbsp;,&nbsp;[[HEXVAL]]&nbsp;,&nbsp;[[HEX]]&nbsp;,&nbsp;[[BIN]]&nbsp;,&nbsp;[[VAL]]
 
[[STR]]&nbsp;,&nbsp;[[HEXVAL]]&nbsp;,&nbsp;[[HEX]]&nbsp;,&nbsp;[[BIN]]&nbsp;,&nbsp;[[VAL]]
Zeile 48: Zeile 48:
 
<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 = 10 ' default use 10 for the SW stack
 
$swstack = 10 ' default use 10 for the SW stack
Zeile 65: Zeile 65:
 
   
 
   
 
Dim B As Byte
 
Dim B As Byte
' assign value to B
+
' Wert an B zuweisen:
 
B = Binval(s)
 
B = Binval(s)
 
   
 
   

Aktuelle Version vom 1. März 2013, 22:25 Uhr

Inhaltsverzeichnis

Funktion

Wandelt die Zeichenkettendarstellung einer binären Zahl in eine Zahl um.

 

 

Syntax

var = Binval( s)

 

 

Anmerkungen

var

Numerische Variable der der Wert von s zugewiesen wird.

s

Zeichenkettenvariable. Sollte nur die Ziffern 0 oder 1 enthalten.

 

 

 

Siehe auch

STR , HEXVAL , HEX , BIN , VAL

 

 

Beispiel


$regfile = "m48def.dat" ' Mikrocontroller
$crystal = 8000000 ' 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
 
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
 
 
Dim S As String * 8
S = "11001100"
 
Dim B As Byte
' Wert an B zuweisen:
B = Binval(s)
 
Print B
End

Languages   English Deutsch  
Meine Werkzeuge
Namensräume
Varianten
Aktionen
Navigation
In anderen Sprachen
Sprache