fork download
  1. program ideone;
  2.  
  3. {$MODE OBJFPC}{$LONGSTRINGS ON}
  4.  
  5. uses
  6. SysUtils;
  7.  
  8. procedure ShowComponents(const ALine: String);
  9. var
  10. strLine: String;
  11. pchrComp: PChar;
  12. begin
  13. strLine := StringReplace(ALine, ' ', #0, [rfReplaceAll]) + #0;
  14. pchrComp := @strLine[1];
  15.  
  16. while pchrComp^ <> #0 do
  17. begin
  18. WriteLn('"', StrPas(pchrComp), '"');
  19. pchrComp += StrLen(pchrComp) + 1;
  20. end;
  21. end;
  22.  
  23. begin
  24. ShowComponents('p123 1000.02 1000.01');
  25. end.
  26.  
Success #stdin #stdout 0s 444KB
stdin
Standard input is empty
stdout
"p123"
"1000.02"
"1000.01"