I'm in the process of updating mex files for 64-bit compatibility. In many places I have code where an int needs to be changed to type mwSize, but that variable still gets compared to something like an integer. For example:
mwSize n = mxGetNumberOfElements(mxArray);int_T i;
and then the following code:
for (i = 1; i < n; i++) ...other stuff
Here "i" is of type int_T and "n" is of type mwSize. Is this a valid comparison? I don't get any warnings when I compile the 64-bit mex here, but I was wondering if this could cause any problems when I execute the mex?
Thanks,
Rebecca
Best Answer