> > PPAL := Void_To_Logpalette(Win32.Malloc.Malloc(
> > Win32.Strings.size_t((Win32.WinGdi.LOGPALETTE'size)/8 +
> > NPAL*((WinGdi.PALETTEENTRY'size)/8))));
> The person who wrote this code needs to learn what a declare block is.
> Build complex expressions step by step using local declarations, not big
> bang as in the example.
Also, I assume the divide by eight is intended to compute the size in
"bytes" of the object. This will work in many cases, but what if the
'Size is not a multiple of eight?
For example, Boolean'Size is 1 by fiat. The method above would make it
zero bytes. Better to use (XXX'Size + 7) / 8
Off-topic (with no offense intended toward the person who quoted Yant):
> Those who believe in the supernatural should be required to learn
> computer programming. This would force them to discover that things
> which appear at first to be completely mysterious and incomprehensible,
> in fact have a logical (and usually simple) explanation. --J.B.R. Yant
The supernatural (in the common sense of the term) is a simpler
explanation than the natural for many mysterious and incomprehensible
phenomena. That of course does not make it logical. Still, how logical
is it to say, "The only reasonable explanation for a phenomenon that I
don't understand is the one I give you."
I believe firmly in the supernatural: 'super' = above and 'natural' =
what our puny brains have been able to figure out.
Finally, why should they be 'required' to learn anything?
Thomas Jefferson (not an exact quote): "Government's purpose should be to
protect one person from the harm by another. It does me no harm for my
neighbor to say there is no god, or one God, or three gods, or twenty."
If person A says "Ada is good," and person B says "Ada is bad," tolerance
is acknowledging that they are both still people. Contrary to popular
opinion, it is NOT "promoting tolerance" to curse, assault, censor, or
fine person C who suggests that one of these people might be incorrect.
Nor is it "opposing intolerance" to blame person A for the flames that
person D spewed against person B.
Now, substitute your favorite social, political, or religious issue for
"Ada" above and tell me why the principle no longer holds.