NMD
Value handling

NMD handles scalar and array values slightly differently. For scalar values use NMDSetValue() and NMDGetValue(); for array values use NMDSetArrayValue(), NMDGetArrayValue(), NMDCopyArrayValue(). The array routines take an extra parameter denoting the length of the array.

Note that scalar values have to be passed by reference:

  int i,*ii;
  NMDSetValue(nmd,....,&i);        // use an ampersand here
  NMDSetValue(nmd,....,ii,length); // no ampersand needed here!
  NMDGetValue(nmd,....,&i);
  NMDGetValue(nmd,....,&ii,&length);

Furthermore, see NMDCopyItemValues(), NMDGetDataType(), NMDIsArrayType().