Skip to content

Parsing error for function isUndefined( ...)  #14

@digarcia

Description

@digarcia

When using the isUndefined function as defined in the cd++ manual

Signature: isUndefined : Real → Bool
Description: Returns True if the value is undefined, else returns False.

I get a parsing error for several cases. The only working one is for a concrete value (isUndefined(4))

I attached the ma file with the different cases (undefBugTest.ma). Each one can be tested individually by commenting the others.

The cases are:

  isUndefined(4)	 and 			% ok
  not isUndefined(4) 	 and			% ok
  isUndefined( $var1 )   and			% not ok: Parsing error syntax error, unexpected ')', expecting '!'
  isUndefined( $var2 )   and			% not ok: Parsing error syntax error, unexpected ')', expecting '!'
  isUndefined( $var2 ! 0) and			% ok: But dont know why. I Asume that takes $var2 as a tuple
  isUndefined( $var2 ! 4) and			% ok: But dont know why. I Asume that takes $var2 as a tuple
  isUndefined(?)	  and			% not ok: Parsing error syntax error, unexpected UNDEF
  isUndefined( [?]!0 )    and			% ok: I asume that what happens is that isUndefined expects a tuple. But don't work with plain undef value
  isUndefined( (0,0)~port1 )			% not ok: Parsing error syntax error, unexpected ')', expecting '!'

For the execution:
TIME=00:00:10:000
SIMU_ARGS="$SIMU_ARGS -t$TIME"

undefBugTest.ma.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions