ByteArray - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

type/ByteArray

check for a byte array

 Calling Sequence type(expr, ByteArray)

Parameters

 expr - any expression

Description

 • The type(expr, ByteArray) function returns true if expr is a ByteArray.
 • A ByteArray is a one-dimensional Array with data type ${\mathrm{integer}}_{1}$.
 • This is the standard way of representing an arbitrary chunk of binary data

Examples

 > $A≔\mathrm{StringTools}:-\mathrm{ToByteArray}\left("Lorem ipsum dolor sit amet"\right)$
 ${A}{≔}\left[\begin{array}{cccccccccccccccccccccccccc}{76}& {111}& {114}& {101}& {109}& {32}& {105}& {112}& {115}& {117}& {109}& {32}& {100}& {111}& {108}& {111}& {114}& {32}& {115}& {105}& {116}& {32}& {97}& {109}& {101}& {116}\end{array}\right]$ (1)
 > $\mathrm{type}\left(A,\mathrm{ByteArray}\right)$
 ${\mathrm{true}}$ (2)
 > $B≔\mathrm{convert}\left(\left[2,3,5,7,11,13\right],\mathrm{ByteArray}\right)$
 ${B}{≔}\left[\begin{array}{cccccc}{2}& {3}& {5}& {7}& {11}& {13}\end{array}\right]$ (3)
 > $\mathrm{type}\left(B,\mathrm{ByteArray}\right)$
 ${\mathrm{true}}$ (4)

Compatibility

 • The type/ByteArray command was introduced in Maple 2015.
 • For more information on Maple 2015 changes, see Updates in Maple 2015.