[comp.lang.pascal] Using files from within a file

storm@cs.mcgill.ca (Marc WANDSCHNEIDER) (03/28/91)

I would like to make my PASCAL program to use another file that is either
in the current directory, or in the path.

For example, I might want a program to run McAfee's SCAN on a set of files,
or I might want to run PKZIP.

Is there a way to do this from within a PASCAL program...?

./*-

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storm@cs.mcgill.ca         McGill University           It's 11pm, do YOU
Marc Wandschneider         Montreal, CANADA            know what time it is?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

derek@sun4dts.dts.ine.philips.nl (derek) (03/28/91)

storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes:

>I would like to make my PASCAL program to use another file that is either
>in the current directory, or in the path.

>For example, I might want a program to run McAfee's SCAN on a set of files,
>or I might want to run PKZIP.

>Is there a way to do this from within a PASCAL program...?
>storm@cs.mcgill.ca         McGill University           It's 11pm, do YOU
>Marc Wandschneider         Montreal, CANADA            know what time it is?

Use the {$M} directive to give the executed file some space to run
SwapVectors
Exec ...
SwapVectors

Read the manual on these commands.

This is a FAQ - see Prof. Timo Salmi's excellent FAQ file at garbo.edu

Best Regards, Derek Carr
DEREK@DTS.INE.PHILIPS.NL           Philips I&E TQV-5 Eindhoven, The Netherlands 
Standard Disclaimers apply.

ts@uwasa.fi (Timo Salmi) (03/29/91)

In article <1991Mar27.161456.2175@cs.mcgill.ca> storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes:
>
>
>I would like to make my PASCAL program to use another file that is either
                                                       ^^^^
>in the current directory, or in the path.

Your probably mean another program.

>For example, I might want a program to run McAfee's SCAN on a set of files,
>or I might want to run PKZIP.
>
>Is there a way to do this from within a PASCAL program...?

See your manual for the exec keyword, or /pc/ts/tsfaq17d.arc for the
trick. 

...................................................................
Prof. Timo Salmi        
Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.12.37
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun