Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?



No the point is:

If the variable version is banned then you can't make that programming
mistake.

If you do try to make that mistake the compiler will give you a compile
error.

And then a good programmer like you will automatically know what the problem
is, must use SetLength for dynamic arrays.

Bye,
Skybuck.


.



Relevant Pages

  • Re: Poll: SizeOf(variable) vs SizeOf(type), should SizeOf(variable)be banned ?
    ... If the variable version is banned then you can't make that programming mistake. ... OK, so when I try to pass the variable to SizeOf, the compiler will complain and I'll know to fix something. ... But now I decide I should have a dynamic array instead of a static array. ...
    (alt.comp.lang.borland-delphi)
  • Re: [EGN] Numerical Accuracy
    ... The advice worked because in fact the Microsoft compiler had a bug. ... The capabilities of the optimizer are not so ... The language standard itself says ... of "programming" as a nonprofession. ...
    (comp.programming)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... and just hone in on the stuff related to programming and this newsroup] ... moron that was taken from optimization which does hoist when to do so ... compiler design and optimization, including my 1976 text in graduate ... loop in a language in which the designers messed up, ...
    (comp.programming)
  • Re: 8 digits possible using QBASIC?
    ... I even have uncorrupted [my mistake] ADVANCED HELP files now. ... I would have to find my original notes when I was programming in PDS71. ... I could add up to a trillion or 16 digits but not multiply to 16 ... I can tell you which lights in 100,000,000 lights in ...
    (comp.lang.basic.misc)
  • Re: Javas performance far better that optimized C++
    ... The compiler is extremely stupid. ... no memory leaks are guaranteed. ... However I have GC in my .NET programming. ... "C.9.1 Automatic Garbage Collection ...
    (comp.lang.cpp)