Autor Beitrag
aM0xACiLLiN
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64



BeitragVerfasst: Di 27.04.04 21:16 
Hi,

ich suche nach einer Möglichkeit, das scanf() von c(++) in delphi zu benutzen. printf gibt's ja indirekt, als format.
Scanf funktioniert genau umgekehrt, dh sag ihm das format, den string und er macht mir das ganze in variablen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
t:='a b c';
t2:=Format('d %s',[t]); // t2 = d a b c
// und so hätte ich's gerne:
t3:=Scanf('d %s',t2,[t]); // müsste mir dann a b c zurückgeben


cu & danke
UC-Chewie
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 531

WinXP
D5 Ent
BeitragVerfasst: Di 27.04.04 21:47 
Ein scanf gibt es nicht. Du kannst über Read bzw. ReadLn lesen. Je nachdem, von welchem Typ die von dir übergebene Variable ist, wird der eingelesene Wert interpretiert.

_________________
Egal wie dumm man selbst ist, es gibt immer andere, die noch dümmer sind
aM0xACiLLiN Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64



BeitragVerfasst: Mi 28.04.04 06:48 
Hi,

ich möchte ja garnicht lesen, sondern einen String einfacher teilen als mit copy/pos/gettoken/etc..

cu