[fpc-pascal] Executing another program from Pascal

Marco van de Voort marcov at stack.nl
Wed Mar 29 20:36:29 CEST 2006


> Marco van de Voort wrote:
> 
> >Dos.exec still exist, but as a substitute sysutils.ExecuteProcess is
> >recommended. (1.9.2+ though) 
> >
> >Note that both don't exec the command itself.
> >
> Thank you for the information
> Sometimes the docs looks like a haystack with no needle. (According to 
> my view)
> 
> 
> Elio Cuevas G?mez wrote:
> 
> >El Mar 28 Mar 2006 13:40, Hans M?rtensson escribi?:
> >  
> >
> >>In good old days the Turbo Pascal had an EXEC procedure ..
> >>    
> >>
> >I think that function is in the DOS unit. And it even works in Linux!
> >  
> >
> 
> Until recently I have only made win32 programs. Now I am trying to do 
> something on a Linux box. And I was surprised that the Linux version of 
> FPC had the same units. Even the DOS unit works on the Linux system? 
> Wonderful!

The more normal functions yes. Dos interrupt calls of course don't work.

However please use executeprocess, it will avoid problems with too deeply
nested paths. (dos.exec is limited to an overall 255 chars).




More information about the fpc-pascal mailing list