Borrar filtros
Borrar filtros

Simulink Truth Table Action Language Whitespace

1 visualización (últimos 30 días)
Paul Rancuret
Paul Rancuret el 4 de Mzo. de 2023
Editada: Paul Rancuret el 4 de Mzo. de 2023
Simulink Truth Table Action Language Whitespace:
I've found that the action language for truth tables in Simulink do not support space characters before and after the equals sign. This was discovered in R2020b.
For example, the statement below will not compile:
x = true;
The statement below will compile:
x=true;
The error message that occurs when using the first statement does not indicate the problem is with whitespace. Instead, it implies that I used an '=' when I meant '==' or vice-versa, which wasn't the problem.
This was very difficult for me to track down the problem. I think a future update should either support spaces in the action language, or update the error handler so it mentions white space as a potential cause of the compile error in the error message. I also wanted to post this in case someone else runs into the same problem; perhaps they can search and find this.
More details when this was encountered:
  • Truth Table used within Stateflow Chart with Matlab action language
  • Data object 'x' existed in Chart context with 'boolean' data type and 'local' context
  • Conditions handled similarly (boolean data objects local to chart). Whitespace was used in conditional statements in the Truth Table with no error.
  • Truth Table code interface set to generate 'inlined' within Chart code.

Respuestas (0)

Categorías

Más información sobre Complex Logic en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by