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 - setmode() change display mode http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setmode()           Change display mode
------------------------------------------------------------------------------
 Declaration
   screen.hdr

 Syntax
   func logical setmode extern
   param value uint    uLines, ;
         value logical lClearScreen

 Arguments
   uLines is the desired number of rows displayed on screen.

   lClearScreen indicates whether the screen is to be cleared.

 Return
   A logical indicating the success of setting the display mode.

 Description
   The setmode() function attempts to change the display mode to match
   the number of rows specified by the uLines parameter. The change
   reflected in the value returned by the __max_row system variable.
   Setting the display mode is only available on EGA or better
   monitors. Valid values for the uLines parameter are 25, 43 and
   50. The screen is always cleared when switching to 43 rows
   mode, while it is optional in 25 and 50 rows modes (depending on
   the lClearScreen parameter).

 Example
   #define EXAMPLE_SCREEN
   #include example.hdr

   proc Test_setmode
   vardef
      uint n
   enddef
   wait
   setmode( 50, .f. )        // set 50 rows without clearing the screen
   wait
   for n := 1 to 10          // print some lines
      ? "hello", n
   next
   wait
   setmode( 25, .f. )        // set 25 rows without clearing the screen
   wait
   for n := 1 to 10          // print some lines
      ? "hello", n
   next
   wait
   setmode( 43, .t. )        // set 43 rows with clearing the screen
   wait
   for n := 1 to 10          // print some lines
      ? "hello", n
   next
   wait
   setmode( 25, .t. )        // set 25 rows with clearing the screen
   wait
   endproc

   proc main
   Test_setmode()
   endproc

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