Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>restgets() - restore your get stack, do multi level reads</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:    restgets() - restore your get stack, do multi level reads
  Usage:   restgets(<string>)
  Params:  string variable that was previously returned by savegets()
  Returns: nothing

 ---------------------------------- Example ---------------------------------

                 cls()
                 set key 28 to ADDCOMPANY

                 Fname   = space(20)
                 Lname   = space(25)
                 Address = space(30)
                 City    = space(20)
                 State   = space(2)
                 Zip     = space(5)

                 print(02,06,"First.....:")
                 print(02,42,"Last:")
                 print(04,06,"Address...:")
                 print(05,06,"City......:")
                 print(05,39,"State:")
                 print(05,49,"Zip:")

                 @ 02,18 get Fname
                 @ 02,48 get Lname
                 @ 04,18 get Address
                 @ 05,18 get City
                 @ 05,46 get State     picture "!!"
                 @ 05,54 get Zip       picture "#####"

                 read

                 cls()
                 return


                   PROC ADDCOMPANY
                   para d1,d2,d3

                           * save the gets currently in use
                           ********************************
                           tempgets = savegets()

                           * setup a new screen
                           ********************
                           tempscrn = savescreen()

                           Cname    = space(20)
                           CAddress = space(30)
                           CCity    = space(20)
                           CState   = space(2)
                           CZip     = space(5)

                           print(12,06,"Company...:")
                           print(13,06,"Address...:")
                           print(15,06,"City......:")
                           print(15,39,"State:")
                           print(15,49,"Zip:")

                           @ 12,18 get Cname
                           @ 13,18 get CAddress
                           @ 15,18 get CCity
                           @ 15,46 get CState    picture "!!"
                           @ 15,54 get CZip      picture "#####"

                           read

                           * restore the old gets
                           **********************
                           restgets(tempgets)

                           * restore the old screen
                           ************************
                           restscreen(tempscrn)

                   return

  Note:    Do not use savegets()/restgets() inside an onkey() or
           timeout() function. Since they do not 'enter' the get
           the user is working on, there is a chance that the user
           will lose data when the new gets are enabled. You can not
           save the get stack memory variable to a disk file, it is
           only valid during the program as it is running. Do not
           clear gets either since the original get stack will be
           lost, savegets() does not save the entire get stack, only
           the list that defines the get stack.

See Also: savegets() activate() active() m_stack()

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