How can I print a continuous slice of a dynamic array?

In reply to ianmurph:

Two problems with your example.

A slice of an unpacked dynamic array is still an unpacked array expression, not an integral value. And dynamic arrays get indexed starting from element 0, so it would have to be [0:3].

You could use a cast to convert the unpacked array to packed.

$display("ACK HEADER_ID: 0x%X", 32'( {>>{rx_message_array[0:3]}} ) );