[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FN_NAMEL()
General purpose string to length+string packet function
------------------------------------------------------------------------------
Syntax
fn_NameL( cName, nRequiredLength) => cReturn
Arguments
<cName> - the character string to be used (shouldn't be longer
than 255 characters
<nLength> - if specified, the String is padded with NULLs
to this length
Returns
<cReturn> - a character string with a one byte word at the beginning
which indicates the string length, including a null terminator
which is added if it does not exist.
Description
There are numerous places where a character string that is sent
needs to be encoded with a leading BYTE specifying the length
and may also need to be padded with NULLs.
A terminating null is guaranteed.
If the Length of cName is greater than nRequiredLength -1,
it is truncated to leave room for the terminator.
Examples
Source: N:\SRC\MISC\NAMEL.PRG
Author: Steven Tyrakowski
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson