Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - setlogicmask() set acceptable logical picture characters http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setlogicmask()      Set acceptable logical picture characters
------------------------------------------------------------------------------
 Declaration
   io.hdr

 Syntax
   proc setlogicmask extern
   param value byte bCharTrue, ;
         value byte bCharFalse

 Arguments
   bCharTrue is the ASCII value of the character to display in logical
   fields having a .t. value.

   bCharFalse is the ASCII value of the character to display in logical
   fields having a .f. value.

 Return
   None.

 Description
   The setlogicmask() procedure allows changing the default characters
   displayed in a logical get field. By default, a get on a logical
   field with picture "Y" accepts 'Y', 'y', 'N', and 'n' as valid
   entries only.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc Test_setlogicmask
   vardef
      logical lPaid
   enddef
   lPaid := .t.
   clear
   
   @ 10, 10 say "Yes or No " get lPaid picture "Y"     // English
   read
   
   setlogicmask( 'J', 'N' )
   @ 10, 10 say "Ja or Nein" get lPaid picture "Y"     // German
   read
   
   setlogicmask( 'O', 'N' )
   @ 12, 10 say "Oui or Non" get lPaid picture "Y"     // French
   read
   
   setlogicmask( 'S', 'N' )
   @ 14, 10 say "Si or No  " get lPaid picture "Y"     // Spanish
   read
   
   setlogicmask( 'D', 'N' )
   @ 16, 10 say "Da or Nyet" get lPaid picture "Y"     // Russian
   read
   
   endproc

   proc main
   Test_setlogicmask()
   endproc

See Also: get

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