Displaying 1 result from an estimated 1 matches for "r_init_mydll".
2008 Aug 07
1
string comparison
...0)
category = h_category_decision;
else if(strncmp(CHAR(asChar(Scategory)), "instance", 8) == 0)
category = h_category_instance;
else
category = h_category_error;
I would like to replace the strncmps with pointer comparisons so I set
up some global variables in the R_init_myDLL function like this:
charChance = install("chance")
<etc.>
but I can't seem to get the comparison to work. I want to do something
like
if(CHAR(asChar(Scategory)) == charChance)
category = h_category_chance;
but category always ends up being h_category_error. A...