home *** CD-ROM | disk | FTP | other *** search
- Path: cs.uwa.edu.au!jasonb
- From: jasonb@cs.uwa.edu.au (Jason S Birch)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: 9 Jan 96 08:49:36 GMT
- Organization: The University of Western Australia
- Message-ID: <jasonb.821177376@cs.uwa.edu.au>
- References: <4com6v$415@maureen.teleport.com> <jasonb.821098303@cs.uwa.edu.au> <volker.0e58@vb.franken.de>
- NNTP-Posting-Host: decadence.cs.uwa.oz.au
- X-Newsreader: NN version 6.5.0 #3 (NOV)
-
- volker@vb.franken.de (Volker Barthelmann) writes:
-
- >Jason S Birch (jasonb@cs.uwa.edu.au) wrote:
- >: However, once done, he can then safely create variables of that type
- >: (the abstract one he's defined, which happens to be the right size) and
- >: safely assign appropriate values to them, without having to worry if
- >: the eventual assignments are implemented as a .c, .w, or .l. He can
-
- >In many cases, but not in all cases. It might e.g. be impossible to declare
- >certain hardware registers precise enough in a HLL. So the programmer has to
- >know its representation and has to do it by hand.
-
- How about bitfields? They can hide information about what particular
- bits are used for, and their order in the structure.
-
- >: The question is not about whether you need to know if a variable is a
- >: float or a long, since they are "abstract" types (and can be different
- >: sizes on different machines). The question is whether you need to know
- >: how many bits are in each, and what each bit means. In assembler, you
- >: do need to know the former, and occasionally the latter.
-
- >You sometimes need to know it in HLLs, too. Numerical calculations almost
- >always need very detailed information on the data types. Just have a look
- >at a C compiler's float.h.
-
- I wouldn't say "almost always" - in any case, by using the #defined
- labels, you are *still* portable and hiding the implementation details
- from yourself.
-
- >In many cases You can forget such things after the declaration, but there
- >are lots of other cases, too.
-
- Perhaps, but I'll wager they're extremely rare - with assembler, which
- is what the discussion was about, you constantly need to remind
- yourself of those implementation details, and consistently get it
- right.
-
- >Volker
-
- --
- Jason S Birch ,-_|\ email: jasonb@cs.uwa.edu.au
- Department of Computer Science / \ Tel (work): +61 9 380 1840
- The University of Western Australia *_.-._/ Fax (work): +61 9 380 1089
- Nedlands W. Australia 6907 v Tel (home): +61 9 386 8630
-