freepascal - Returning a value in Pascal -
for function return value in pascal assignment functionname := someval;
used. assume doesn't stop function execution in exact place return
in c does. there similar c return
in pascal? (i'm using freepascal compiler)
you can use exit procedure.
function foo (value : integer) : integer; begin exit(value*2); dosomethingelse(); // never execute end;
Comments
Post a Comment