◄Summary► ◄Example► ◄Up► ◄Contents► ◄Index► ◄Back► ─────Run-Time Library─────────────────────────────────────────────────────── The _cgets function reads a string of characters directly from the console and stores the string and its length in the location pointed to by <buffer>. The <buffer> argument must be a pointer to a character array. The first element of the array, <buffer[0]>, must contain the maximum length (in characters) of the string to be read. The array must have enough elements to hold the string, a terminating null character (\0), and two additional bytes. The _cgets function continues to read characters until a carriage- return─linefeed combination (CR-LF) is read, or the specified number of characters is read. The string is stored starting at <buffer[2]>. If a CR-LF combination is read, it is replaced with a null character (\0) before being stored. The _cgets function then stores the actual length of the string in the second array element, <buffer[1]>. The _cgets function allows editing of the entry with the same keys available from the DOS command line. Use gets if you do not want editing to be available. Return Value The _cgets function returns a pointer to the start of the string, which is at <buffer[2]>. There is no error return. -♦-