Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TCXL Database - appendix d - format control characters http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                  Appendix D - Format Control Characters

  FCC      Description
  ---      -----------
  #........Allows numeric characters '0' thru '9'.
  %........Allows numeric characters '0' thru '9' and ' '.
  9........Allows numeric characters '0' thru '9', '.', '-', and '+'.
             This field is for floating-point numeric input.  The
             decimal does NOT need to appear in the format string, as in
             previous versions.  The decimal IS returned as part of the
             input buffer.
  $........Allows numeric characters '0' thru '9', '.', '-', and '+'.
             This field is for currency input.  TCXL treats it as
             floating-point input ('9'), but the displayed field will
             show a '$'.  This field format is valid only in an entry
             form, and uses the currency prefix/suf-fix/separator
             characters defined in _EntCtl.
  ?........Allows any character.
  *........Allows any printable character.
  A........Allows alpha characters 'A' thru 'Z', 'a' thru 'z', and ' '.
  D........Allows date characters '0' thru '9', '-', and '/'.
  F........Allows legal MS-DOS filename characters.
  H........Allows hexadecimal characters '0' thru '9', 'A' thru 'F', and
             'a' thru 'f'.
  L........Allows alpha characters 'A' thru 'Z', 'a' thru 'z', and ' '.
             Input letters will be converted to lowercase.
  M........Allows alpha characters 'A' thru 'Z', 'a' thru 'z', and ' '.
             Input letters will be converted to mixed case
  P........Allows alpha characters 'A' thru 'Z', 'a' thru 'z', and ' '.
             Input letters will be displayed as spaces, which is useful
             for entering passwords.
  T........Allows telephone number characters '0' thru '9', '(', ')','-
             ', and ' '.
  U........Allows alpha characters 'A' thru 'Z', 'a' thru 'z', and ' '.
             Input letters will be converted to uppercase.
  W........Allows legal MS-DOS filename characters, including wildcards.
  X........Allows alphanumeric characters 'A' thru 'Z', 'a' thru 'z',
             '0' thru '9', and ' '.
  Y........Allows yes/no response characters 'Y', 'N', 'y', and 'n'.
  (space)..Space characters can be used throughout a format string to
             improve its readability.
  <........Start of inclusion set.  An inclusion set allows you to
             specify the only allowable characters for a position.
  >........End of inclusion set.  Any characters listed between the left
             and right angle brackets are part of the set.
  [........Start of exclusion set.  An exclusion set allows you to
             specify characters that aren't allowed in that position.
  ]........End of exclusion set.  Any characters listed between the left
             and right square brackets are part of the set.
  '........Start or end of quoted text that will be displayed either in
             the input field or as you are typing.  All characters in
             between the start and end quotes will be displayed as text.
  "........Same as the single quote.  Is useful if you need to actually
             display a single quote as text.  Note that in C, you must
             represent the double quote as:  \"
  !........Start and stop a command toggle sequence.  Any characters in
             between the start and stop exclamation points are treated
             as command toggles.  You can have as many command toggles
             as you like between the exclamation points.  Valid command
             toggles are listed below.  Command Toggles are valid with
             KvGetFmt() and KwGetFmt() only!
  Command
  Toggle   Description
  -------  -----------
  -........Decreases text attribute.  Valid with KwGetFmt() only.
  +........Increases text attribute.  Valid with KwGetFmt() only.
  C........Toggles copying of quoted characters to receiving buffer.
             Default is off.
  E........Toggles Escape checking.  When on, if [Esc] is pressed, the
             receiving buffer will be emptied and an error code will be
             returned.  Default is on.
  L........Toggles lower-case conversion.  When on, all input letters
             will be forced to lower-case.  Default is off.
  M........Toggles mixed-case conversion.  When on, input letters will
             be forced to upper-case for the first letter of each word
             and lower-case for the remaining letters.  Default is off.
  P........Toggles password mode.  When on, input characters will be
             echoed to the screen as spaces.  This is useful for
             password fields.  Default is off.
  R........Toggles Return checking.  When off, if [Enter] is pressed, it
             will be ignored.  This is useful for forcing the user's
             input.  Default is on.
  U........Toggles upper-case conversion.  When on, input letters will
             be forced to upper-case.  Default is off.

Examples:

          KvGetFmt(name,"'Enter name:  ' !UR! XXXXX !R! XXXXXXXXXX");

Prompts for  name, inputs  string from  keyboard converting  characters  to
uppercase as  it goes,  allows up  to 15  alphanumeric characters as input.
The return  key is  disabled until at least 5 characters have been entered.
Input characters  will be  copied to the receiving buffer, name, which must
be large  enough to  hold all  16 characters - 15 for the input string, and
one for the terminating '\0'.
.
          KwGetFmt(phone," 'Enter phone:  '!RC! '(' ### ') ' ### '-'
              ####");

Prompts for  a full  phone number  including area  code, allows  only digit
characters and  displays format  punctuation as  it goes.  The entire field
must be  filled before return can be pressed.  All of the characters except
the prompt will be copied to the receiving buffer, phone.  This buffer must
be large  enough to  hold 15 characters - 10 for the phone number digits, 4
for the copied punctuation characters, and 1 for the terminating '\0'.

          EntFld( 1,16,date,"<01>#'/'<0123>#'/'<89>#",0,0,NULL,0);

Defines an input field that will accept a MMDDYY date.  Note the use of the
inclusion set '<' and '>' characters to aid in allowing only valid numbers.
The receiving  buffer, date,  must be  at least  7 characters to hold the 6
date characters and the terminating '\0'.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson