ex61.pp 432 B

123456789101112131415161718192021222324
  1. Program ex61;
  2. { Example program to demonstrate the CreateShellArgV function }
  3. // note: CreateShellArgV is reasonbly obsolete in 1.9.x due to the new fpexec functions
  4. uses Unix;
  5. Var
  6. S: String;
  7. PP : PPchar;
  8. I : longint;
  9. begin
  10. S:='script -a -b -c -d -e fghijk';
  11. PP:=CreateShellArgV(S);
  12. I:=0;
  13. If PP<>Nil then
  14. While PP[i]<>Nil do
  15. begin
  16. Writeln ('Got : "',PP[i],'"');
  17. Inc(i);
  18. end;
  19. end.