convert_array()

Returns a new AEL array created from an existing array, but with the elements of the existing array converted to the specified type. Since this function does not work on HPvars, ensure that the parameters passed are arrays.

See also: offset_array(), resize_array(), array_size(), array_type(), array_lowerBound(), array_upperBound().

Syntax:

newArr = convert_array(<arr>, <str>);

where

arr is a valid AEL array

str is a valid AEL string. Possible values:

  • "integer", "int", "long" will convert to integer
  • "real", "double" will convert to real
  • "complex" will convert to complex

Example:
decl a = {{1,2,3},{4,5,6}};
decl b = convert_array(a,"complex");
fputs(stderr, identify_value(a)); // outputs {1,2,3},{4,5,6}}
fputs(stderr, identify_value(b)); // outputs 
{{1+0i,2+01,3+0i},{4+0i,5+0i,6+0i}}

Where Used:

Measurement Expressions (Data Display equations and Schematic MeasEqns), Schematic, Layout, Simulation, GUI

 

Privacy Statement  | Terms of Use  | Legal | Contact Us  | © Agilent 2000-2008 

Contents
Additional Resources