ph_comrecvstring PowerHome formula function
Description
Retrieves a block of characters as a string from the specified COM control.
Syntax
ph_comrecvstring ( comnum, length )
Argument Description
comnum The number of the COM control you are referencing. Valid values are 1 thru 5.
length The number of characters that you would like returned.
Return value
String. Returns "length" characters as a string from the COM controls incoming buffer. If fewer characters are available than the length specified, then all remaining characters are returned. Returns - 1 if a comnum < 1 or > 5 is specified. Returns - 2 if the specified COM control is not valid. Returns - 3 if no characters are waiting to be read.
Usage
This function is also capable of receiving binary characters as well. Characters with ASCII values from 32 to 125 and not equal 92 will be returned as their standard character counterparts. Characters below 32, greater than 125, or equal to 92 will be returned as an escape sequence consisting of the "\" character followed by three decimal digits representing the ASCII value. For example, the "\" (backslash character) will be returned as "\092". A carriage return character will be returned as "\013". This counts as a single character concerning the number of characters returned.