mje Posted October 12, 2011 Report Share Posted October 12, 2011 When using the Interpolate 1D Array with an array of integers, I can't seem to keep the index terminal from coercing: The coercion persists regardless of what floating type is presented. I see this behavior if the array is any integer type. Is this intended? Quote Link to comment
OptiNav Posted October 13, 2011 Report Share Posted October 13, 2011 (edited) Maybe I don't understand the problem precisely but what about in such a case: Try to put for example 55,1 into fractional index Edited October 13, 2011 by OptiNav Quote Link to comment
mje Posted October 13, 2011 Author Report Share Posted October 13, 2011 Oh yes, the code indeed works as expected: a value of 55.1 produces the expected output in your code of 165.3. I was only pointing out the existence of the little red coercion dot on the fractional index input. No matter which representation I choose, the value is always apparently coerced. If the coercion is real, I'm not sure what the primitive is expecting for data. Right clicking on the terminal and creating a control/constant still produces a coercion. Quote Link to comment
asbo Posted October 13, 2011 Report Share Posted October 13, 2011 If you don't wire an input array, you can drop a constant off the index terminal which doesn't coerce. However, try changing the representation to another floating point (fixed or single) - still no coercion. Now undo and redo - coercion dot! Report this to NI. It's a bug of some sort, but it may not have any severe consequences. Quote Link to comment
OptiNav Posted October 13, 2011 Report Share Posted October 13, 2011 Sorry MJE, I misunderstood. Indeed, now I see the problem If you don't wire an input array, you can drop a constant off the index terminal which doesn't coerce. However, try changing the representation to another floating point (fixed or single) - still no coercion... ...now just run - coercion dot! Quote Link to comment
asbo Posted October 13, 2011 Report Share Posted October 13, 2011 It seems that the IDE and compiler (?) are getting out-of-sync until the compiler catches, smacks the IDE in the face, and says, "Hey, you can't do that!" Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.