On Sat, 24 May 2003, Mirsad Todorovac wrote:
Hi, Frank!
------------------------------------------------------- program mirsad16(output);
function testproc (n: LongCard): String(64); begin n := n; return 'OK'; end;
begin WriteLN (testproc (42)); end. ------------------------------------------------------- bash-2.05b$ gpc -Wall mirsad16.pas mirsad16.pas:4: warning: missing string capacity -- assuming 255 mirsad16.pas:4: parse error before `('
I couldn't find in reference docs whether this is actually banned by specification, or is it a bug in parser.
I think it is a minor bug that's been around for quite some time. This works with only the warning message: function( n: Longcard ): String; This works with no messages: Type Astring = string( 123 ); function( n: Longcard ): Astring; Incidently, since the function return is on the stack if you write Astring = string( 123456789 ); you will get a run time seg fault. my 2 cents Russ