Skip to main content

IAR Embedded Workbench for Arm 9.70.x

__evaluate

In this section:
Syntax
__evaluate(string, valuePtr)
Parameters
string

Expression string.

valuePtr

Pointer to a macro variable storing the result.

Return value

Result

Value

Successful

int 0

Unsuccessful

int 1

Table 34. __evaluate return values 


For use with

All C-SPY drivers.

Description

This macro interprets the input string as an expression and evaluates it. The result is stored in a variable pointed to by valuePtr.

Example

This example assumes that the variable i is defined and has the value 5:

__evaluate("i + 3", &myVar)

The macro variable myVar is assigned the value 8.