Hi,
l need to create a 2D array of complex with ADS2006 U3
to do so, l first create a Integer array and then use the Convert_array() function .... but l get the message: "Operand: wrong type of parameter" during the execution.
l just tried the piece of code provided in the Convert_array() help, and doesn't work:
defun my_test()
{
decl c = {1,2,3,4};
decl b = convert_array(c,"complex");
return {b};
}
any idea ?
thanks,
Michael
l need to create a 2D array of complex with ADS2006 U3
to do so, l first create a Integer array and then use the Convert_array() function .... but l get the message: "Operand: wrong type of parameter" during the execution.
l just tried the piece of code provided in the Convert_array() help, and doesn't work:
defun my_test()
{
decl c = {1,2,3,4};
decl b = convert_array(c,"complex");
return {b};
}
any idea ?
thanks,
Michael
More specifically issue is your return statement. The function "return {b};" (with curley braces) is returning the array b expressed within another array, i.e. { {1+0i,2+0i,3+0i,4+0i} }, instead of the plain array {1+0i,2+0i,3+0i,4+0i}. Too many curley braces!
Try changing the "return {b};" statement to "return (b);" (parentheses) of simply "return b;" (no parentheses).