Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:
Origin Pro 2017 (64 bit) SR 2; b9.4.2.380
Windows 10.
Hello everyone!
I have a problem with passing an enum instance to the function via Command window, where as if I call a separate function and do the same everything works as expected.
Here is the minimum working example and the output:
#include <Origin.h>
typedef enum {first, second,third} Numbers_type;
void Somesomefunc123456(Numbers_type num)
{
switch (num)
{
case first: out_str("is 1");
break;
case second: out_str("is 2");
break;
default: out_str("somenum");
}
}
void anotherfunc()
{
Somesomefunc123456(first);
}
Call stack + output:
9> Somesomefunc123456(first)
Command Error!
10> anotherfunc()
is 1
12> Somesomefunc123456(1)
is 2
13> Somesomefunc123456(0)
is 1
Why the direct call via enum does not work? I need enum names like first, second and not integers for the actions, that the function will perform on the whole project (multiple folders, subfolders etc.), so simply passing numbers is not a solution I am looking for
Thank you in advance