Is comparing type mwSize to an int valid?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!