mb_get_array_type |
mb_data_e mb_get_array_type( LPARRAY pArr )
Returns the data type of the array pointed to by pArr.
Example
///////////////////////////////////////////////////////////////////////////// // Copy the whole array from Array In to Array Out // mb_error_e CMYBASIC2_MaxMAL::VSet( _array_t* pOut, _array_t* pIn ) { if ( !pOut || !pIn ) return SE_RN_BAD_PARAMS; if ( !IS_NUM_ARRAY( pIn ) ) return SE_RN_BAD_PARAMS; if ( !CompareDims( pOut, pIn, TRUE ) ) return SE_RN_BAD_PARAMS;
int nSize = mb_get_array_element_count( pIn ) * ( mb_get_array_type( pIn ) == MB_DT_REAL ? sizeof( real_t ) : sizeof( int_t ) );
memcpy( pOut->raw, pIn->raw, nSize );
return SE_NO_ERR; } endfunc
|