Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Ronald Newsgroups: comp.sys.acorn.programmer Subject: Re: Calling Ghostscript from BASIC Date: Mon, 15 Jun 2020 20:30:39 +1200 Organization: - Lines: 27 Message-ID: <6fd2e88058.beeb@-.-> References: <587d6e2a47rhnews@dsl.pipex.com> <1cb5648058.beeb@-.-> <1dc8c98058.beeb@-.-> Injection-Info: reader02.eternal-september.org; posting-host="74d593cd36b5a4ccaa4a46b1e73628b3"; logging-data="4880"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194b9h+zzmf+dGbSyUtsW8h" User-Agent: Messenger-Pro/1.00c (MsgServe/1.00a) (RISC-OS/5.24) NewsHound/v1.50-32 Cancel-Lock: sha1:ntPPIlo/bW33ZyYljLsmlIuXoUk= Xref: csiph.com comp.sys.acorn.programmer:6165 In message druck wrote: > On 15/06/2020 03:51, Ronald wrote: > > The FilerHRun module is not mentioned much these days but it may > > have had this type of usage in mind. > > It can run a binary directly from BASIC, but once again you have to > > perform a wait. Haven't checked to see if SYS$RETURNCODE is possible. > > It wont be. Sys$Return code is only valid if you explicitly run a > program via OSCLI. Any sort of FilerRun, TaskObey or other Wimp > mechanism will usually return to you straight away, and queue the > program to be run when they get the next Wimp Poll. Only they will be > able to read Sys$Return code when the program exits and you can't rely > on this variable once Wimp Poll is called, as something else may have > exited. > > ---druck OK, getting back to being better running the binary in an Obey for that kind of simplicity then. My Fetchmail program is in an obey file called by a Taskwindow. It is well suited for Sys$ReturnCode it can range from O to 16 or so. 0 for mail received, 1 for no mail to retrieve, and higher numbers reflect various authorisation or network faults. Thanks Ronald