Hello,
Do you think it is possible to modify the prcedure "FillChar()" to make it work correctly with the type String(xx)?
For example the code: VAR S10 : String(10); .... FillChar(S10, 10, 'A');
WriteLn(S10);
Would display: AAAAAAAAAA
I ask this because I am working on (converting to GPC) a lot of existing code, with FillChar() spread everywhere (more than 1200 SUN Pascal sources), and it works as expected on strings on SUN Pascal. However, since there is no 'Capacity' field in SUN Pascal strings, it cannot be overridden. I understand this can be a big job since calling FillChar() on a record containing Strings should work as well. I think this would be a nice feature anyway, don't you?
Also, if this cannot be done or desirable from your point of view, is there a way to override the build-in FillChar() for one of mine that would be called for the type String(xx) only?
I know this is not an elegant workaround, but this problem causes a lot of nasty bugs in the converted programs. If I was to write the code from scratch this would not be an issue, but rewriting more than 600 000 lines of Pascal code is an even bigger challenge :-(
Regards
Pascal Viandier pascal@accovia.com