Menu

const problem

Cepreu
2011-12-19
2013-04-25
  • Cepreu

    Cepreu - 2011-12-19

    I've tryed to declare negative constant:

    const UpKlick = -1;

    but got the error message

    _ test.mpsrc(7): E206 constant expected_

    from compiler.

    There is no restrictions about constant value in the documentation. What's the problem?

    Thank you!

     
  • Cepreu

    Cepreu - 2012-01-12

    Please try this declaration (version 3.3RC):

    MenuInd, MenuKey, MenuInd: integer;

    You wil get:

    Compiling 'test.mpsrc'…
    Class loading error: Truncated class file
    ERROR: an error occurred compiling Test.mpsrc

    But:

    MenuInd: integer;
    MenuKey, MenuInd: integer;

    works well:

    Compiling 'test.mpsrc'…
    test.mpsrc(11): E400 identifier 'menuind' already defined

     
  • Javier Santo Domingo

    Hey,

    Sorry for the delayed replay, I'm really busy these days and have no time to answer support questions of any kind. But luckily got a little free time to update MP with this things you report and add other things I had in my TODO list.

    Find both things fixed in MP 3.5 ALPHA released today.

    Regards and thanks for the reports!

     
  • Cepreu

    Cepreu - 2012-02-17

    Another strange situation:

    Compiling 'test.mpsrc'…
      using external library Lib_ui.class
    Fatal error: Internal error #015
    ERROR: an error occurred compiling Test.mpsrc

    Ater removing Lib_UI:

    Compiling 'test.mpsrc'…
      using external library Lib_ui.class
    Fatal error: Internal error #015
    ERROR: an error occurred compiling Test.mpsrc

    And the reason was a tipo in parameter declarations (please note 7 in integer7):

    procedure Alert(Title, Msg: string; Pos: integer7);
    
     
  • Cepreu

    Cepreu - 2012-02-17

    Sorry, ater removing Lib_UI:

    Compiling 'test.mpsrc'…
    Fatal error: Internal error #015
    ERROR: an error occurred compiling Test.mpsrc

     

Log in to post a comment.