Re: TIP #129 and 64 Bit platforms
From: Benjamin Riefenstahl (Benjamin.Riefenstahl_at_epost.de)
Date: 12/08/03
- Next message: Bob Techentin: "Re: Comfortable source file size?"
- Previous message: Volker Hetzer: "Re: TIP #129 and 64 Bit platforms"
- In reply to: Matthias Rohr: "TIP #129 and 64 Bit platforms"
- Next in thread: Matthias Rohr: "Re: TIP #129 and 64 Bit platforms"
- Reply: Matthias Rohr: "Re: TIP #129 and 64 Bit platforms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Dec 2003 18:46:36 +0100
Hi Matthias,
Matthias.Rohr@SturmIT.de (Matthias Rohr) writes:
> What I need are integer types, that are the same size on all
> platforms, something like Tcl_Int2, Tcl_Int4. Tcl_Int8.
Why? I use int or short as "at-least-16-bits", long as
"at-least-32-bits" and long long (or a typedef if I have to support
VC) for "at-least-64-bits". I never use built-in types as overlays
for byte arrays, so I never need exact-sized types. Instead I use
unsigned version of all types and bit shift, binary "and" and binary
"or" to convert from byte array to number and back. Keeps my code
portable with ease and without unnecessary #ifdefs.
benny
- Next message: Bob Techentin: "Re: Comfortable source file size?"
- Previous message: Volker Hetzer: "Re: TIP #129 and 64 Bit platforms"
- In reply to: Matthias Rohr: "TIP #129 and 64 Bit platforms"
- Next in thread: Matthias Rohr: "Re: TIP #129 and 64 Bit platforms"
- Reply: Matthias Rohr: "Re: TIP #129 and 64 Bit platforms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|