Prof. A Olowofoyeku (The African Chief) wrote:
On 2 Apr 2002 at 1:30, Frank Heckenbach wrote:
[...]
Fair enough. But can you at least generate an error or add this to the FAQ (i.e., if it is not there already?).
I didn't see it there. Perhaps you might want to write a suggested wording for the FAQ.
What about something like this:
Q. Any "gotchas"?
A. Be careful when passing string literals as parameters to routines accepting the string as a value parameter and that internally modify the value of the parameter. Inside the routine, the value parameter gets a fixed Capacity - the length of the string literal that was passed to it. Any attempt to assign a longer value will not work.
OK. I'm adding:
This only applies if the value parameter is declared as @samp{String}. If it is declared as a string with a given capacity (e.g., @samp{String (255)}), it gets this capacity within the routine.
Frank