STRING/de
From MCS Wiki AVR
< STRING(Difference between revisions)
(Created page with "= <span class="f_Header">Action</span> = Returns a string consisting of m repetitions of the character with ASCII Code n. <span style="font-family: Arial;"> </span> <s...") |
(→Example) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | = <span class="f_Header">Funktion</span> = | |
− | + | Gibt eine Zeichenkette zurück, die aus m Wiederholungen des Zeichens mit dem ASCII-Code n besteht. | |
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
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="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 | |
| 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);" | | ||
− | + | 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 | |
| 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);" | | ||
− | + | 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 | |
| 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);" | | ||
− | + | Anzahl der zuzuweisenden Zeichen. | |
|} | |} | ||
Line 43: | Line 43: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | + | 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. | |
| | ||
Line 51: | Line 51: | ||
<span style="font-family: Arial;"> </span> | <span style="font-family: Arial;"> </span> | ||
− | = <span class="f_Header"> | + | = <span class="f_Header">Siehe auch</span> = |
[[SPACE]] | [[SPACE]] | ||
Line 59: | Line 59: | ||
<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 = 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
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 |
---|