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>activate() - activate get number <nn></b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:    activate() - activate get number <nn>
  Usage:   activate(<getnum>)
  Params:  integer <getnum>, the get to activate when return from
           a set key to procedure

  Returns: nothing

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

                This example always returns to get # 2 after popping
                out to the ADDCOMPANY procedure.

                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)

                        * re-activate get # 2
                        *********************
                        activate(2)

                return

  Note:    The gets are numbered in the order they appeared in your
           PRG file, not necessarily in the order they appear on the
           screen. You can only activate() a get when returning from
           a SET KEY TO procedure. When the initial READ builds the
           get buffer it always starts at 1. active() will always
           return the active get for the CURRENT read only. Do not
           stuff the keyboard at all after you issue an activate().
           To achieve the reactivation of the get, some keystrokes
           are stuffed into the buffer and they will be overwritten
           thereby causing the reactivation to possibly fail in some way.
           If you do stuff keys, during the reactivation, the contents
           of the get are restored so the keys you stuff into the buffer
           will simply be ignored anyway.

See Also: active()

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