Skip to content

buffer uppercase

_BUFFER_UPPERCASE

Type Function BOOL
Input PT POINTER TO BYTE (address of the Buffer )
SIZE UINT (size of the buffer)
Output BOOL (Returns TRUE)
The function _BUFFER_UPPERCASE interprets each byte in the buffer as ASCII characters and converts it to uppercase . When called, a pointer to the array and its size in bytes is passed to the function. Under CoDeSys the call reads _BUFFER_INIT(ADR(Array), SIZEOF(Array), INIT), where array is the name of the array to be manipulated. ADR is a standard function, which identifies the Pointer the array and SIZEOF is a standard function, which determines the size of the array. The function only returns TRUE. By the Pointer given array is manipulated directly in memory.
This type of processing arrays is very efficient because no additional memory is required and no surrender values must be copied.

_buffer_uppercase

Example:

_BUFFER_UPPERCASE(ADR(bigarray), SIZEOF(bigarray))