Skip to content

Commit 32d5298

Browse files
use tokens rather than magic
1 parent 4839a98 commit 32d5298

File tree

1 file changed

+7
-1
lines changed
  • examples/standalone_examples/eval/src

1 file changed

+7
-1
lines changed

examples/standalone_examples/eval/src/main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include <ti/real.h>
33
#include <ti/getkey.h>
44
#include <ti/screen.h>
5+
#include <ti/tokens.h>
56
#include <stdio.h>
67
#include <string.h>
78

@@ -37,7 +38,12 @@ int main(void)
3738
if (ret == 0)
3839
{
3940
/* Tokenized representation of "A+A" */
40-
const char expression[] = "\x41\x70\x41";
41+
const uint8_t expression[] =
42+
{
43+
OS_TOK_A,
44+
OS_TOK_ADD,
45+
OS_TOK_A,
46+
};
4147

4248
ret = os_Eval(expression, sizeof expression);
4349
}

0 commit comments

Comments
 (0)