>  Docs Center  >  Libraries  >  Motley  >  MGH_N_BYTES
Libraries

MGH_N_BYTES

MGH_N_BYTES

Name


  MGH_N_BYTES

Purpose


  Return the total number of bytes in data element

Calling Sequence


      result = mgh_mgh_n_bytes(a)

Positional Parameters


  a (input, numeric or string, scalar or array)
    Data element whose size in bytes is to be returned.

Keyword Parameters


  LONG64 (input, switch)
    If set, return result as 64-bit integer. Default is long integer.

Return Value


  The total number of bytes in a is returned as an integer scalar.

Notes


  - For a string array, the number of bytes is computed after conversion
    with the BYTE() function, i.e. each element has the same length,
    equal to the maximum individual string length.

Modification History


  Written, based on N_BYTES in the IDL Astronomy Library. The
  motivation was that the return type was changed from a 32-bit
  integer to a 64-bit integer, breaking most of the code i used it
  in.



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us