On Mon, 26 May 2003, CBFalconer wrote:
Mirsad Todorovac wrote:
On Sun, 25 May 2003, Russell Whitaker wrote:
On Sat, 24 May 2003, Mirsad Todorovac wrote:
[ snip ]
Why is that 'testproc' function using non-standard syntax in the first place? What is wrong with the perfectly standard (apart from function type):
function testproc (n: LongCard): String(64); begin n := n; testproc := 'OK'; end;
Agreed, " testproc := " is more readable than " return " but you left the " : String(64); " bug.
It would be nice if the compiler could take something like function foo: string; begin foo := 'OK'; end; and have it automatically set capacity = length of the return.
While I'm wishing, how about: Astring = string() value "<some string>"; It compiles, but assumes capacity = 255 rather than the length of <some string>.
Russ