CBFalconer wrote:
Frank Heckenbach wrote:
... snip ...
C++ has `//' comments and overloading (that doesn't necessarily mean they were invented there, I don't know that exactly), C/C++ have function calls with `()'. C/C++ has `void *' parameters which are like BP's untyped parameters, but I suppose variants are not quite
The C "void *" has a very specific meaning. It is a generic pointer, and is non-derefenceable. It can always be converted into a typed pointer, and that conversion is only meaningful for the original type. i.e. you cannot convert a pointer to an array of char to a void* and expect to convert that to a pointer to an integer.
Since Pascal does not have the wild abandonment of C pointer construction and usage, the only equivalent is the NIL pointer.
Well, I didn't talk about Pascal, but Borland Pascal. ;-) (I suppose Marco has unsubscribed by now, so we can save another flamewar. ;-)
BP's untyped parameters are indeed like C's `void *'. They can be converted to something else which is meaningful for the original type, or when you know exactly the internal memory layout. BP programs regularly do such things (there are other ways to get into such trouble in BP, while in SP/EP you only get there by misusing variant records) which is one reason why many of them are so hard to port.
The less said about // the better.
Agreed.
Frank