Hi,
I have a question regarding arrays of characters passed as parameters to procedures.
If I declare:
Type Str40 = Array[1..40] Of Char; Str80 = Array[1..80] Of Char;
Var S40 : Str40; S80 : Str80; S : String(50);
Procedure DoArray(SParam : STRING); ..
Procedure DoArrayVar(VAR SParam : STRING); ...
I can call DoArray with S40, S80 and S as parameter with no problem, but I cannot call DoArrayVar with S40 or S80 (It gives the error: type mismatch in argument 1 of 'DoArrayVar' at compilation time). I don't understand why it works when the parameter is not VAR and why it does not work when it is VAR.
To have DoArrayVar work, I had to remove the parameter type, and assign the parameter S to a local variable pointer to a Str80. It works for S40 and S80 but not anymore for S.
Is there a way to declare a VAR parameter that would accept S40, S80 and S? Or is there a way to disable temporarily the type checking? Or something else ;-)
Thanks
Pascal Viandier pascal@accovia.com