🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #8453

Re: Return values of System Functions

#8453
From: Scott Evernden
Date: Tue, 05 Apr 1988 14:48
11 lines
1067 bytes
In article <8804030250.AA23769@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes:
>	Since an integer return value is in D0, the callee can treat it 
>either as a long or short.  Thus, even if the entire D0 register is used,
>if the actual range of the return value is within the limits of a short,
>you can declare the function as returning a short.

Except when it returns a USHORT.  Some Intuition functions do, or at
least I think they do.  I used to think all functions returned longs
until I got badly burned dealing with this in the recent past.

-scott
Technical Details
Message-ID: <687@applix.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!tness7!petro!swrinde!ut-sally!im4u!husc6!mailrus!ames!oliveb!amiga!cbmvax!ulowell!m2c!applix!scott
References: <8804030250.AA23769@cory.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!tness7!petro!swrinde!ut-sally!im4u!husc6!mailrus!ames!oliveb!amiga!cbmvax!ulowell!m2c!applix!scott
From: scott@applix.UUCP (Scott Evernden)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Return values of System Functions
Message-ID: <687@applix.UUCP>
Date: 5 Apr 88 14:48:44 GMT
References: <8804030250.AA23769@cory.Berkeley.EDU>
Reply-To: scott@applix.UUCP (Scott Evernden)
Organization: APPLiX Inc., Westboro MA
Lines: 11