Forum Discussion

FICO's avatar
FICO
Community Manager
8 years ago

Procedure error, why?

Why does this result in an error message (Syntax Error before ")")?

procedure sInitialise()

declarations

end-declarations

initializations from "mmsheet.excel:Dataset.xlsx"

mFracRet as "noindex;[Sheet1$D103:H105]"

end-initializations

initializations from "mmsheet.excel:Configurations.xlsx"

mConfiguration as "noindex;[Configurations$A8:Z28]"

end-initializations

end-procedure

1 Reply

  • FICO's avatar
    FICO
    Community Manager

    Mosel does not accept empty blocks, so the error is due to your using "()" after the procedure name: if there are no arguments to a subroutine you simply state is name:

      procedure sInitialise

      ...

      end-procedure

    Similarly, any empty 'keyword ... end-keyword' block such as the 'declarations' in your example will result in an error: if you don't need it, comment it out or remove it entirely.