Screen.cpp
/*--- function CBSForm::CrackFieldOnForm -----------------------------------
 *
 *  Examines a line on a form and cracks off the first field, if any.
 *  Entry:  restofline  is the remainder of the line on the form, starting
 *                      after the character (such as { or [) that started the field.
 *          
 *  Exit:   restofline  is the rest of the line, after cracking off the
 *                      entire field, including the starting char, the
 *                      contents of the field, and the ending char if any.
 *          Returns the length of the field, not including delimiters.
 */
function CBSForm::CrackFieldOnForm
Examines a line on a form and cracks off the first field, if any.
Entry:  restofline  is the remainder of the line on the form, starting
after the character (such as { or [) that started the field.

restofline  is the rest of the line, after cracking off the
entire field, including the starting char, the
contents of the field, and the ending char if any.
Returns the length of the field, not including delimiters.
function CBSForm :: CrackFieldOnForm Examines a line on a form and cracks off the first field if any . Entry : restofline is the remainder of the line on the form starting after the character ( such as { or [ ) that started the field . restofline is the rest of the line after cracking off the entire field including the starting char the contents of the field and the ending char if any . Returns the length of the field not including delimiters .
int CBSForm::CrackFieldOnForm(CString &restofline, CString &strName, char &endch)
{
   int fieldlen;
   strName.Empty();
   CString strContents = restofline.SpanExcluding("[]{}~");
   fieldlen = strContents.GetLength();
   restofline = restofline.Mid(fieldlen);
   if(!fieldlen) {
      return 0;
   }
   endch = 0;
   if(restofline.GetLength()) {
      endch = restofline.GetAt(0);
      if(strchr("]}~",endch)) {
         restofline = restofline.Mid(1);
      }
   }
   strName = strContents;
   strName.TrimRight();
   return fieldlen;
}
int CBSForm :: CrackFieldOnForm ( CString & restofline , CString & strName , char & endch ) { int fieldlen ; strName . Empty ( ) ; CString strContents = restofline . SpanExcluding ( " " ) ; fieldlen = strContents . GetLength ( ) ; restofline = restofline . Mid ( fieldlen ) ; if ( ! fieldlen ) { return 0 ; } endch = 0 ; if ( restofline . GetLength ( ) ) { endch = restofline . GetAt ( 0 ) ; if ( strchr ( " " , endch ) ) { restofline = restofline . Mid ( 1 ) ; } } strName = strContents ; strName . TrimRight ( ) ; return fieldlen ; }
function CBSForm::CrackFieldOnForm
  Examines a line on a form and cracks off the first field, if any.
function CBSForm :: CrackFieldOnForm Examines a line on a form and cracks off the first field if any .