Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>read</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
READ


Syntax:     READ [SAVE]

Purpose:    To enter full-screen editing mode using the current pending
            GETs.

Option:     Save: The SAVE option retains the current set of pending
            GETs, allowing you to edit the same GETs by issuing another
            READ.  If it is not specified, the current GETs are cleared.

Usage:      READ executes full-screen editing using all GETs pending
            since the most recent CLEAR, CLEAR GETS, CLEAR ALL or READ.
            If there is a FORMAT SET, READ passes control to it before
            entering full-screen edit.

            Within a READ, you can edit the contents of and navigate
            between GETs.  Whenever you press a key that terminates a
            GET, control passes to the VALID clause if it has been
            specified.  A return value of true (.T.) terminates the GET
            and processes the navigation key.  A false (.F.) value
            causes the navigation key to be ignored, and the current GET
            to be re-entered.

            The following tables list active keys within a READ:


            Table: READ Navigation Keys
            ---------------------------------------------------------------
               Key               Action
            ---------------------------------------------------------------
               Leftarrow,        Character left. Does not move cursor to
               Ctrl-S            previous GET.

               Rightarrow,       Character right. Does not move cursor
               Ctrl-D            to next GET.

               Ctrl-Leftarrow,   Word left.
               Ctrl-A

               Ctrl-Rightarrow,  Word right.
               Ctrl-F

               Uparrow,          Previous GET.
               Ctrl-E

               Dnarrow,          Next GET.
               Ctrl-X,
               Return,
               Ctrl-M

               Home              First character of GET.
               End               Last character of GET.

               Ctrl-Home         Beginning of first GET.
               Ctrl-End          Beginning of last GET.
            ---------------------------------------------------------------

            Note: Pressing Home or End in quick succession goes to
            the first or last non-blank character in the GET.


            Table: READ Editing Keys
            ----------------------------------------------------------
               Key            Action
            ----------------------------------------------------------
               Del,           Delete character at cursor position.
               Ctrl-G
               Backspace,     Destructive backspace.
               Ctrl-H
               Ctrl-T         Delete word right.
               Ctrl-Y         Delete from cursor position to end of GET.
               Ctrl-U         Restore current GET to original value.
            ----------------------------------------------------------


            Table: READ Mode Keys
            ----------------------------------------------------------
               Key            Action
            ----------------------------------------------------------
               Ins,           Toggle insert mode.
               Ctrl-V
            ----------------------------------------------------------


            Table: READ Escape Keys
            ----------------------------------------------------------
               Key            Action
            ----------------------------------------------------------
               Ctrl-W,        Terminate READ saving current GET.
               Ctrl-C,
               PgUp,
               PgDn
               Return,        Terminate READ from last GET.
               Ctrl-M
               Esc            Terminate READ without saving current GET.
               Uparrow        Terminate READ from first GET
                              if READEXIT() = .T.
               Dnarrow        Terminate READ from last GET
                              if READEXIT() = .T.
            ----------------------------------------------------------

            In addition, you can terminate a READ by executing a CLEAR,
            CLEAR GETS, or CLEAR ALL from within a SET KEY procedure or
            a user-defined function initiated by VALID.

            Note that a BREAK that occurs within a READ, terminates the
            READ and CLEARs GETs even if the SAVE clause is used.

Library:    CLIPPER.LIB


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

   STORE SPACE(10) TO var1, var2

   @ 10, 10 SAY "Variable one: GET var1
   @ 11, 10 SAY "Variable two: GET var2

   READ


See Also: @...SAY...GET CLEAR GETS LASTKEY() ReadKey()

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