Mail Archives: djgpp/2000/05/22/02:31:51
On Sun, 21 May 2000, Alexei A. Frounze wrote:
> You said "there should be no need to mix them", right? Is somewhere
> stated that I can't use strlen()s, sizeof()s, etc for making file offsets,
> array indexes, etc? If nowhere this stated that implies I *can*. It's a very
> logical thing: add sizes/lengths of objects and you'll find offset/index.
> Right? And this idea is compiler independant.
> If this is correct, why I can't mix those types (size_t, fpos_t, etc)?
Please re-read one of my previous messages. I think I replied to that
question already. In a nutshell, you need to find out which of these
types tends to have a larger size.
That doesn't contradict the other part of my message where I said that
there should be no reason for mixing these types, in a
correctly-written program. These types describe entities that has no
logical connection. If the need to mix these types does not arise
frequently, the problems are correspondingly small.
That is not the case with int and size_t, for example.
- Raw text -