Sign in Join
Wiki copytemporary

Str/de: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: Str/de

OldNewLine
1+# Str
2+
3+## Beschreibung
4+
5+Mit **Str**, kann man einen numerischen Wert in einen **String** konvertieren. Es ist sogar mittels **: Breite: Dezimal** eine Formatierung des Stringes möglich, siehe Beispiel.
6+
7+> **Note:** Bei Float-Typen muss beachtet werden, das immer ein **Punkt** als Dezimaltrenner ausgegeben wird, egal wie die Ländereinstellungen des OS eingestellt sind.
8+
9+## Beispiel
10+
11+``` pascal
12+var
13+ s: string;
14+ i: integer;
15+ f: single;
16+
17+begin
18+ i := 123;
19+ Str(i, s); // ohne Formatierung
20+ WriteLn(s);
21+ Str(i: 8, s); // String formatieren
22+ WriteLn(s);
23+
24+ f := 123.456;
25+ Str(f, s); // ohne Formatierung
26+ WriteLn(s);
27+ Str(f: 8: 4, s); // String formatieren
28+ WriteLn(s);
29+ Str(f: 8, s); // String als komplettes formatieren
30+ WriteLn(s);
31+end.
32+```
33+
34+## Siehe auch:
35+
36+- [[Val/de|Val]] - String in numerischen Wert konvertieren.
37+
38+---
39+*From the Free Pascal wiki, page "Str/de", as it stood on 2020-02-28 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history