Today I programmed in Inno Setup, and I read the Pascal documentation that says exit
used to exit the loop. I tried to use this in my code, and instead it exited the function. For example, in this function, a message box will never be displayed:
function NextButtonClick(CurPageID: Integer): Boolean; var i: Integer; begin Result := True; for i := 0 to 4 do begin exit end; MsgBox('test',mbInformation,MB_OK); end;
I did some more searches, and Pascal also has a break
keyword, so I used it and it works correctly. Is it possible to use exit
to exit a function? I remember that in the afternoon I realized that Pascal does not have the equivalent of a C-style return expression.
I really need some good documentation for the version of Pascal that Inno Setup uses. I have read Inno's help pages, but they do not cover such things. Thanks
source share