One grumble I have had for a while with fork (at least on Windows) is its lack 
of any result indicating success or failure:

fork 'xwy'
fork 'd:\TestJ.xlsm'
fork 'C:\Program Files\Microsoft Office\Office14\Excel.exe'
fork 'C:\Program Files\Microsoft Office\Office14\Excel.exe'
fork 'D:\Program Files (x86)\Microsoft Office\Office14\Excel.exe'
fork 'D:\Program Files (x86)\Microsoft Office\Office14\Excel.exe d:\TestJ.xlsm'

The first 4 failed with no result.  The last two succeeded with no result.

    SH 'Excel.exe'  NB. Worked
42
    SH 'xwy'        NB. Failed
2
    SH 'C:\Program Files\Microsoft Office\Office14\Excel.exe'  NB. failed
2

The verb SH returns the result from ShellExecute:

"If the function succeeds, it returns a value greater than 32. If the function 
fails, it returns an error value that indicates the cause of the failure."

#define ERROR_FILE_NOT_FOUND        2

--
David Mitchell

On 6/17/2011 8:24, Devon McCormick wrote:
> fork 'C:\Program Files\Microsoft Office\Office14\Excel.exe'
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to