home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sunic!dkuug!diku!jkut
- From: jkut@diku.dk (Jonatan Kutchinsky)
- Newsgroups: comp.lang.c
- Subject: Typedefing builtin... thanks.
- Message-ID: <1992Nov9.150414.10221@odin.diku.dk>
- Date: 9 Nov 92 15:04:14 GMT
- Sender: jkut@ask.diku.dk
- Organization: Department of Computer Science, U of Copenhagen
- Lines: 26
-
- I posted a question at comp.std.c about the justification of typedefing built
- in datatypes for data abstraction reasons. I now know that a question like
- that belongs in this newsgroup, and not in comp.std.c.
-
- I just want to thank for all the good replies (13) i got, and give a short
- summary:
-
- People generally tended to agree with me on the use of the names BYTE, WORD,
- and LWORD to represent unsigned 8, 16, and 32 bit variables in my simulation
- of a Motorola 68000 processor. Some even proposed the use of special
- functions or macros for calculations, conversions to builtin types, and for
- I/O. We are going to use this in our computer science project.
-
- One stated that in his ideal program, builtin types were never used, and
- names like f.x. Counter, and BigCounter would represent int and perhaps long,
- depending on the machine used.
-
- The major arguments used to justify these techniques were about portability.
- A program is easier to port, when you can change some typedefs in a header
- file, instead of changing a lot of ints to longs all over the code.
-
- Once more i want to thank. The replies have been very useful.
-
- *****************************************************************************
- Jonatan Kutchinsky, Copenhagen, Denmark. E-mail: jkut@diku.dk
- *****************************************************************************
-