STRING/de

From MCS Wiki AVR
< STRING(Difference between revisions)
Jump to: navigation, search
((**COPIED FROM ENGLISH PAGE**) =)
(Example)
 
(2 intermediate revisions by one user not shown)
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="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" |  
Var
+
var
  
 
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" |  
The string that is assigned.
+
Zeichenkette, der das Ergebnis zugewiesen wird.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
 
| valign="top" width="14%" style="width: 65px; height: 16px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="14%" style="width: 65px; height: 16px; border: 1px solid rgb(0, 0, 0);" |  
N
+
n
  
 
| valign="top" width="100%" style="width: 414px; height: 16px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 414px; height: 16px; border: 1px solid rgb(0, 0, 0);" |  
The ASCII-code that is assigned to the string.
+
Der ASCII-Code des zuzuweisenden Zeichens.
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
 
| valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="14%" style="width: 65px; border: 1px solid rgb(0, 0, 0);" |  
M
+
m
  
 
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="100%" style="width: 414px; border: 1px solid rgb(0, 0, 0);" |  
The number of characters to assign.
+
Anzahl der zuzuweisenden Zeichen.
  
 
|}
 
|}
Line 43: Line 43:
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
Since a string is terminated by a 0 byte, you can't use 0 for n.
+
Weil eine Zeichenkette mit einem 0-Byte terminiert wird kann man keine 0 für n benutzen.
  
Using 0 for x will result in an empty string.
+
Die Benutzung einer 0 für x ergibt einen Leerstring.
  
 
&nbsp;
 
&nbsp;
Line 51: Line 51:
 
<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> =
  
 
[[SPACE]]
 
[[SPACE]]
Line 59: Line 59:
 
<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

Latest revision as of 00:17, 10 March 2013

Contents

Funktion

Gibt eine Zeichenkette zurück, die aus m Wiederholungen des Zeichens mit dem ASCII-Code n besteht.

 

 

Syntax

var = STRING(m ,n)

 

 

Anmerkungen

var

Zeichenkette, der das Ergebnis zugewiesen wird.

n

Der ASCII-Code des zuzuweisenden Zeichens.

m

Anzahl der zuzuweisenden Zeichen.

 

Weil eine Zeichenkette mit einem 0-Byte terminiert wird kann man keine 0 für n benutzen.

Die Benutzung einer 0 für x ergibt einen Leerstring.

 

 

Siehe auch

SPACE

 

 

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 S As String * 15
S = String(5 , 65)
Print S 'AAAAA
End

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