BIN/de

(Difference between revisions)
Jump to: navigation, search
(Syntax)
(Remarks)
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="488" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 
{| width="488" 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="18%" style="width: 84px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="18%" style="width: 84px; border: 1px solid rgb(0, 0, 0);" |  
Var
+
var
  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
The target string that will be assigned with the binary representation of the variable source.
+
Zielzeichenkette der die binäre Darstellung der Quellvariablen zugewiesen wird.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
 
| valign="top" width="18%" style="width: 84px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="18%" style="width: 84px; border: 1px solid rgb(0, 0, 0);" |  
Source
+
source
  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 395px; border: 1px solid rgb(0, 0, 0);" |  
The numeric variable that will be converted.
+
Numerische Variable die umgewandelt werden soll.
  
 
|}
 
|}
Line 38: Line 38:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
The BIN() function can be used to display the state of a port.
+
Die BIN()-Funktion kann benutzt werden um den Zustand eines Ports anzuzeigen.
  
When the variable source has the value &B10100011 the string named var will be assigned with "10100011".
+
Wenn die Quellvariable den Wert &B10100011 hat dann wird der Zeichenkettenvariablen var die Zeichenkette "10100011" zugewiesen.
  
It can be easily printed to the serial port.
+
Diese kann gut über den seriellen Port ausgegeben werden.
  
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>

Revision as of 00:14, 2 March 2013

Contents

Funktion

Wandelt eine numerische Variable in ihre binäre Zeichenkettendarstellung um.

 

 

Syntax

var = Bin(source)

 

 

Anmerkungen

var

Zielzeichenkette der die binäre Darstellung der Quellvariablen zugewiesen wird.

source

Numerische Variable die umgewandelt werden soll.

 

 

Die BIN()-Funktion kann benutzt werden um den Zustand eines Ports anzuzeigen.

Wenn die Quellvariable den Wert &B10100011 hat dann wird der Zeichenkettenvariablen var die Zeichenkette "10100011" zugewiesen.

Diese kann gut über den seriellen Port ausgegeben werden.

 

 

See also

HEX , STR , VAL , HEXVAL , BINVAL

 

 

ASM

NONE

 

 

Example


$regfile = "m48def.dat" ' specify the used micro
$crystal = 8000000 ' 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
 
Config Com1 = Dummy , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0
 
 
Dim B As Byte
' assign value to B
B = 45
 
Dim S As String * 10
'convert to string
S = Bin(b)
 
'assign value to portb
Portb = 33
Print Bin(portb)
 
'of course it also works for other numerics
End

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