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

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -

delphi - How to convert bitmaps to video? -