Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!leah!wfh58 From: wfh58@leah.Albany.Edu (William F. Hammond) Newsgroups: comp.sys.amiga.tech Subject: Re: Execute -- What does it always return -1? Summary: Improper call to Execute() Keywords: amigados dos execute Message-ID: <2493@leah.Albany.Edu> Date: 7 Feb 90 15:08:02 GMT References: <541@qusunb.queensu.CA> Organization: Dept of Math & Stat, SUNYA, Albany, NY Lines: 24 In article <541@qusunb.queensu.CA>, cmichael@qucis.queensu.CA (Ian Carmichael) writes: > Does Execute always return -1? In the following code, caller always > prints "Success = -1", regardless of the value of N in callee.c, or even > caller.c > . . . > int success; > success = Execute ("callee",0,0); ^^^^^^ The first argument to Execute() is the filename of an executable in your command path. In this code "callee" is a function name inside the code. BTW, just for saftety, I would have been happier to see "0L" in the second and third arguments. (I don't know what your compiling environment is.) And, just for safety, if my memory is in gear this morning, Execute() returns "short". > . . . > callee.c > #define N 0 > main() > . . . ------------------------------------------------------------------------ William F. Hammond Dept. of Mathematics & Statistics 518-442-4625 SUNYA, Albany, NY 12222 wfh58@leah.albany.edu wfh58@albnyvms.bitnet -------------------------------------------------------------------------