Re: Ret value from RUN in 4GL
Posted in 1994
Craig Ludington (craigl@MCS.COM) wrote: > When I RUN a command from 4GL: > ... > define rc integer > run "unix_command" returning rc let rc = rc / 256 ^^^^^^^^^^^^^^^^^ > if rc != 0 > then > display rc -- Often some different number than it "should" be > else > display rc -- Always 0 > end if > ... > the return value is often not what I expected. I can test against 0 > explicitly. Is this some type of integer size mismatch? -- Hi Craig, As you see above, you have to devide the returncode thru 256. This is nowhere documented and I have found the solution by "try and error". Hope that helps you, Dirch +----------------------------------------------------------------------------+ | Dirch Scheer email: scheer@stadt-mh.de | | Amt 10-3 Tel. : +49 208 455 1006 | | Stadtverwaltung (snail-)Mail : Ruhrstr. 32 | | Muelheim an der Ruhr D-45468 Muelheim an der Ruhr | |----------------------------------------------------------------------------| | Inspiration gave them the motivation to move on out their isolation | +----------------------------------------------------------------------------+