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 - clear gets delete active gets from read list http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 clear gets          Delete active gets from read list
------------------------------------------------------------------------------
 Syntax
   clear gets

 Arguments
   None.

 Description
   The clear gets command deletes the list of active get items from the
   read list. The memory allocated to each get will be released.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   proc Test_cleargets
   vardef
      char( 10 ) aField[ 3 ]
      char( 1 )  cAnswer
      uint       n
   enddef
   for n := 0 to 2
      aField[ n ] := space( 10 )  // initialize get variables
   next
   clear
   ? coreleft()                   // display free memory
   @ 2, 0 get aField[ 0 ]         // display get fields
   @ 4, 0 get aField[ 1 ]
   @ 6, 0 get aField[ 2 ]
   ?
   wait "Get data? [Y/N]" to cAnswer
   if cAnswer $ 'Yy'
      read                        // accept input to get fields
      ?; ?; ?
   else
      ?
      ? coreleft()                // display free memory
      clear gets // release gets and free memory associated with them
   endif
   ? coreleft()                   // display free memory
   endproc

   proc main
   Test_cleargets()
   endproc

See Also: get read

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