I have the following code:
function nString2nList (Str: String; var Num:Number):boolean; var CurrentChar: integer; begin CurrentChar:=0; while (Str[CurrentChar]<>'a') do begin writeln (Str[CurrentChar]); CurrentChar:= CurrentChar+1; end; nString2nList:=true; end;
begin nString2nList ('-0123a', Num1); end.
I get the following error on the one before last line:
function call as a statement - value is ignored
__________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250
----- Original Message ----- From: "loop lopy" oferstu@yahoo.com To: gpc@gnu.de Sent: Saturday, March 12, 2005 8:53 PM Subject: Calling a function
I have the following code:
function nString2nList (Str: String; var Num:Number):boolean; var CurrentChar: integer; begin CurrentChar:=0; while (Str[CurrentChar]<>'a') do begin writeln (Str[CurrentChar]); CurrentChar:= CurrentChar+1; end; nString2nList:=true; end;
begin nString2nList ('-0123a', Num1); end.
I get the following error on the one before last line:
function call as a statement - value is ignored
Functions return values.
If you say something:=nString2nList('-0123a', Num1); where something is declared as boolean, this warning should go away.