chPeek (Function) |
Top Previous Next |
The "chPeek()" function works like the chRead() function except for the fact that the message will not be removed from the channel and will never be blocked.
Input: ch : CHANNEL The channel to peek the message from.
msg : PTR Pointer to buffer where the message is to be stored.
lenmax : INT Size of the buffer that msg points to. If the size of the message in the channel is larger than lenmax, only lenmax bytes will be read.
Returns: INT
Declaration: FUNCTION chPeek : INT;
Example: THREAD_BLOCK Thread; |