System calls_(re)

Mon, 30 Sep 96 16:52:18 CST


On Mon, 30 Sep 1996 02:03:07 -0400 (EDT), 
John Michael Black   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


J.J. van der Heijden (j.j.vanderheijden@student.utwente.nl)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es