JDJ> I am having trouble getting the EXEC command to work in Turbo Pascal v5.0
JDJ> on the PC. Here is an example program:
JDJ> PROGRAM TEST;
JDJ> USES DOS;
JDJ> BEGIN
JDJ> EXEC('dir','');
JDJ> WRITELN('DONE')
JDJ> END.
For DOS commands to be run with the EXEC command you need to use this structure... EXEC('\command.com','/c dir'); ie you have to run command.com with the paramter '/c' and 'dir' for this to work.
If on the other habd you wish to run a program the format is as follows... EXEC('program.exe','any paramters your want');