Russ Whitaker wrote:
1) How do I pass '-Praw' to PrinterArguments?
Like this: (Thanks, Frank!) program Foo; uses GPC, Printer; var Printer : Text; begin (* New (PrinterArguments, 1);*) getmem(printerarguments,8);{$w-}word(pointer(printerarguments)^):=1; PrinterArguments^[1] := NewString ('-Praw'); AssignPrinter (Printer, null); Rewrite (Printer); Writeln (Printer, 'foo') end. Unfortunately, there is a problem with schema types transported through units, so we need the workaround with `getmem'. I am currently working on this problem, so you will be able use the correct `New' in future releases of GPC.
2) Any particular reason why PrinterArguments isn't just a string?
When you are passing arguments to the program you already know their structure, so it's easy for you to decomposite them. If `PrinterArguments' were just a string, the `pipe' unit would have to do the decomposition before passing the parameters to the subprocess. Not a real problem, but it would be some unnecessary waste of resources. Hope this helps, Peter -- http://home.pages.de/~Peter.Gerwinski/ - G-N-U GmbH: http://www.g-n-u.de Maintainer GNU Pascal - http://home.pages.de/~GNU-Pascal/ - gpc-19990118 GnuPG key fingerprint: 9E7C 0FC4 8A62 5536 1730 A932 9834 65DB 2143 9422 keys: ftp://ftp.gerwinski.de/pub/keys/ - AntiSpam: http://spam.abuse.net
participants (1)
-
Peter Gerwinski