Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4095
Number of posts: 14004

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
HELP!!!!!!!!!!!!!!!!!!!!!!! Posted by Maestro on 12 May 2000 at 10:20 AM
is there a Pascal statement that will allow me to call one program from another program


Edit Report
Re: HELP!!!!!!!!!!!!!!!!!!!!!!! Posted by meisi on 12 May 2000 at 2:14 PM
I think this will work (modified from Tp7-Help File):<br>
<br>
Errors are reported in DosError. When<br>
compiling a program that uses Exec, reduce the<br>
"maximum" heap size; otherwise, there won't be<br>
enough memory (DosError = 8).<br>
<br>
<br>
{$M $4000,0,0 } { 16K stack, no heap }<br>
uses Dos;<br>
<br>
begin<br>
SwapVectors;<br>
{Exec(drive_path_file,parameter);}<br>
Exec('turbo.exe','');<br>
{if you want to use dos-commands (like"dir *.pas") use the}<br>
{exec command like this: Exec('c:\command.com','/c dir');}<br>
SwapVectors;<br>
case doserror of<br>
0:writeln('Done.');<br>
2:writeln('File not found!');<br>
3:writeln('Path not found!');<br>
5:writeln('Access denied!');<br>
6:writeln('Invalid handle!');<br>
8:writeln('Not enough memory!');<br>
10:writeln('Invalid environment!');<br>
11:writeln('Invalid format!');<br>
18:writeln('No more files!');<br>
else writeln('Unknown error!');<br>
end;<br>
end.<br>
<br>
<br>



Edit Report
Re: HELP!!!!!!!!!!!!!!!!!!!!!!! Posted by Laurent Martens on 12 May 2000 at 5:58 PM
: is there a Pascal statement that will allow me to call one program from another program<br>
: <br>
<br>
download the 'execsw' from the library on this site. You can easily find it using the search tool, provided by this site.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.