MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Servisní příručka Strana 37

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 282
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 36
Compiler Directives
2-17
Formatting
By default, the Target Language Compiler outputs all floating-point numbers
in exponential notation with 16 digits of precision. To override the default, use
the directive:
%realformat string
If string is "EXPONENTIAL", the standard exponential notation with 16 digits
of precision is used. If
string is "CONCISE", the Compiler uses a set of internal
heuristics to output the values in a more readable form while maintaining
accuracy. The
%realformat directive sets the default format for Real number
output to the selected style for the remainder of processing or until it
encounters another
%realformat directive.
expr && expr Performs the logical AND of the two
arguments and returns
1 or 0. This can be
used on either numeric or Boolean
arguments.
expr || expr Performs the logical OR of the two arguments
and returns
1 or 0. This can be used on either
numeric or Boolean arguments.
expr ? expr : expr Tests the first expression for logical truth. If
true, the first expression is returned;
otherwise the second expression is returned.
Note: Both are evaluated.
expr , expr Returns the value of the second expression.
Table 2-3: Target Language Expressions (Continued)
Expression Definition
Zobrazit stránku 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 281 282

Komentáře k této Příručce

Žádné komentáře