On Mon, 30 Sep 1996 02:03:07 -0400 (EDT), John Michael Black jm_black@csunix1.lvc.edu wrote:
This may sound like a dumb question. Is there a predefined routine for executing O/S commands built into gpc? (like C's universal "system()" routine.) If not, what would be the easiest way to go about this in unix?
(I suppose I could use the C routine itself as an external procedure, as a last resort...)
There's no builtin system() call because this is not part of the Pascal standard. But there is nothing to stop you from using your C-lib's system() call.
In C: int system (const char *string);
In Pascal: function system(s: cstring): integer; C; function system; external;
(I didn't try this, but have done simular things with fork() and others in the past)
Someday, we should get some units/modules to implement this ... oh, well, keep dreaming...
JanJaap
--- "Nothing shocks me, I'm a scientist", Indiana Jones