Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!pyramid!cbmvax!eric From: eric@cbmvax.UUCP (Eric Cotton) Newsgroups: comp.sys.amiga.tech Subject: Re: More suggestions for programmers Message-ID: <3625@cbmvax.UUCP> Date: 13 Apr 88 13:44:41 GMT References: <8804060758.AA14048@jade.berkeley.edu> Reply-To: eric@cbmvax.UUCP (Eric Cotton) Organization: Commodore Technology, West Chester, PA Lines: 28 In article <8804060758.AA14048@jade.berkeley.edu> SLMYQ@USU.BITNET writes: >[...lottsa good stuff deleted...] >One last side dish. This concerns return codes. I've seen all sizes and >shapes of return codes, even negative ones. Now, in the AmigaDOS manual >(somewhere :), it states that programs should return one of FOUR possible >return codes - 0, 5, 10, and 20. That's IT. Nothing else. 0 is for OK, >5 is for just a warning message (this file has lines that are too long and >they got chopped...), 10 is for an error (file not found), 20 for a complete >and total failure (no version of Intuition is found in the system :) >Now if you'd *PLEASE* stick to the standards AmigaDOS laid out, things would >be much nicer - even if you don't think highly of AmigaDOG :) Specifically, the return codes are as follows (from dos.h): #define RETURN_OK 0 /* No problems, success */ #define RETURN_WARN 5 /* A warning only */ #define RETURN_ERROR 10 /* Something wrong */ #define RETURN_FAIL 20 /* Complete or severe failure*/ -- Eric Cotton Commodore-Amiga *======================================================================* *===== UUCP: {rutgers|ihnp4|allegra}!cbmvax!eric =====* *===== FONE: (215) 431-9100 =====* *===== MAIL: 1200 Wilson Drive / West Chester, PA 19380 =====* *===== PAUL: "I don't find this stuff amusing anymore." =====* *======================================================================*