Menu

#1 using define-variables in SMV

open
nobody
None
3
2008-07-13
2008-06-29
Anonymous
No

In the following,

DEFINE
N := 2;
VAR
last : 0..N;

there is no error when defining N, but for some reason it seems to not recognize N as a constant when declaring last.

--Ariel

Discussion

  • sya

    sya - 2008-07-13
    • priority: 5 --> 3
     
  • sya

    sya - 2008-07-13

    Logged In: YES
    user_id=1524272
    Originator: NO

    This is defiantly a bug... Thanks.

    However, I don't think that it will be solved soon...
    JTLV parsing works in phases.
    The first is the construction of the structure and the definition of variables.
    Only then JTLV work on the define statements.
    This is since usually defines are propositional statement on system variables.
    The last phase is the statements evaluation.

    It most of slip my mind that defines could also be used as a parameters in the declaration phase.
    Since it is not a show stopper,
    and there is a very simple workaround,
    I'm lowering its priority.

    When I'll clear up time, I'll try to issue some kind of warning for this case.

    Thanks...

     

Log in to post a comment.

MongoDB Logo MongoDB