Prof Abimbola Olowofoyeku wrote:
An "initialize-any-variable" procedure would be a good idea. In Delphi, a similar procedure exists, called "Initialize". This is the Dephi documentation on it:
"procedure Initialize(var V [ ; Count: Integer ] );
Description [...]
In my other post, I suggested "Initialize". This has the advantage of being a Delphi-compatible name. And the implementation can also be Delphi-compatible, if that can easily be achieved.
Well, almost. Of course, we don't always fill it with zeros, but rather do the appropriate initializations. :-) And I think (hope) we can also omit the second parameter since this is equivalent to initializing an array (which can be achieved by type-casting if nothing else helps).
I've implemnted it now, so the attached test passes. If you think that's not enough, please send me additional tests.
Frank