Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- From: "Skybuck Flying" <spam@xxxxxxxxxxx>
- Date: Sat, 5 Jan 2008 11:57:25 +0100
SizeOf(Buffer);
What if Buffer is changed from a static array to a dynamic array.
SizeOf doesn't work for dynamic arrays.
Another reason why not to use SizeOf like that.
One main reason I started to program in TurboPascal and later Delphi is that
it's more easy to change code in Delphi without running into all kinds of
stupid changes and/or bugs everywhere, sometimes some smartness is needed as
well.
Using SizeOf on static buffers is clearly not very smart <- bug prone.
Bye,
Skybuck.
.
- Follow-Ups:
- Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- From: Rob Kennedy
- Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- From: Rudy Velthuis
- Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- From: Rudy Velthuis
- Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- References:
- Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable) be banned ?
- From: Skybuck Flying
- Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable) be banned ?
- From: Rob Kennedy
- Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- From: Rudy Velthuis
- Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable) be banned ?
- Prev by Date: Poll: Scrap new and dispose from the language ?
- Next by Date: Re: Scrap new and dispose from the language ?
- Previous by thread: Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- Next by thread: Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
- Index(es):
Relevant Pages
|