length

Determine length of message queue

Description

example

length(message_name) checks the number of messages in the internal receiving queue of an input or local message.

Examples

expand all

Check the queue for message M. If a message is present, remove it from the queue. If exactly seven messages remain in the queue, increment the value of x.

Tips

  • The length operator is not supported for input messages that use external receiving queues. To use the length operator, enable the 'Use internal message queue' property for this message.

Introduced in R2018b