BINVAL/de
From MCS Wiki AVR
< BINVAL(Difference between revisions)
(→(**COPIED FROM ENGLISH PAGE**) =) |
(→Example) |
||
(2 intermediate revisions by one user not shown) | |||
Line 15: | Line 15: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <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 | |
| 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);" | | ||
− | + | 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 | |
| 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);" | | ||
− | + | Zeichenkettenvariable. Sollte nur die Ziffern 0 oder 1 enthalten. | |
|} | |} | ||
Line 40: | Line 40: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Siehe auch</span> = |
[[STR]] , [[HEXVAL]] , [[HEX]] , [[BIN]] , [[VAL]] | [[STR]] , [[HEXVAL]] , [[HEX]] , [[BIN]] , [[VAL]] | ||
Line 48: | Line 48: | ||
<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"> | ||
− | $regfile = "m48def.dat" ' | + | $regfile = "m48def.dat" ' Mikrocontroller |
− | $crystal = 8000000 ' | + | $crystal = 8000000 ' 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 | ||
Line 65: | Line 65: | ||
Dim B As Byte | Dim B As Byte | ||
− | ' | + | ' Wert an B zuweisen: |
B = Binval(s) | B = Binval(s) | ||
Latest revision as of 00:25, 2 March 2013
Contents |
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 |
---|