Files
harbour-core/doc/en/readvar.txt
Viktor Szakats b68e5beb2f 2016-11-07 14:50 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
- doc/en/hb_set.txt
  * doc/en/set.txt
  * contrib/hbgd/doc/en/hbgd.txt -> contrib/hbgd/doc/en/gdwrp.txt
  * contrib/hbmisc/doc/en/dates2.txt -> contrib/hbmisc/doc/en/dates.txt
  * contrib/hbmisc/doc/en/ht_class.txt -> contrib/hbmisc/doc/en/fileread.txt
  * contrib/hbmisc/doc/en/ht_conv.txt -> contrib/hbmisc/doc/en/nconvert.txt
  * contrib/hbmisc/doc/en/ht_str.txt -> contrib/hbmisc/doc/en/strfmt.txt
  * contrib/hbxpp/doc/en/browse.txt -> contrib/hbxpp/doc/en/dbcmdx.txt
  * contrib/hbziparc/doc/en/hbziparc.txt -> contrib/hbziparc/doc/en/ziparc.txt
  * contrib/rddads/doc/en/adsfuncs.txt -> contrib/rddads/doc/en/adsfunc.txt
  * doc/en/array.txt -> doc/en/arrayshb.txt
  * doc/en/eval.txt -> doc/en/evalhb.txt
  * doc/en/input.txt -> doc/en/inputall.txt
  * doc/en/lang.txt -> doc/en/langall.txt
  * doc/en/nation.txt -> doc/en/natmsg.txt
  * doc/en/setmode.txt -> doc/en/gx.txt
  * doc/en/tgetlist.txt -> doc/en/readvar.txt
    * renames to sync doc filenames with source filename

  ; Above patches come from 3.4 fork commits below:

    2016-11-03 14:01 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
    2016-11-03 13:48 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
2016-11-07 14:52:06 +01:00

65 lines
1.9 KiB
Plaintext

/*
* Copyright 1999 Chen Kedem <niki@actcom.co.il>
* Documentation for: ReadVar()
*
* See COPYING.txt for licensing terms.
*
*/
/* $DOC$
$TEMPLATE$
Function
$NAME$
ReadVar()
$CATEGORY$
API
$SUBCATEGORY$
User interface
$ONELINER$
Return variable name of current GET or MENU
$SYNTAX$
ReadVar( [<cVarName>] ) --> cOldVarName
$ARGUMENTS$
<cVarName> is a new variable name to set.
$RETURNS$
ReadVar() return the old variable name. If no variable previously
was set, ReadVar() return "".
$DESCRIPTION$
ReadVar() is set inside a READ or MENU TO command to hold the
uppercase name of the GET / MENU TO variable, and re-set back to old
value when those commands finished. You should not normally set a
variable name but rather use it to retrieve the name of a GET
variable when executing a VALID or WHEN clause, or during SET KEY
execution and you are inside a READ or MENU TO.
$EXAMPLES$
#include "inkey.ch"
// display a menu, press F1 to view the MENU TO variable name
CLS
@ 1, 10 PROMPT "blood sucking insect that infect beds "
@ 2, 10 PROMPT "germ; virus infection "
@ 3, 10 PROMPT "defect; snag; (source of) malfunctioning"
@ 4, 10 PROMPT "small hidden microphone "
@ 6, 10 SAY "(Press F1 for a hint)"
SetKey( K_F1, {|| ShowVar() } )
MENU TO What_Is_Bug
STATIC PROCEDURE ShowVar()
Alert( ReadVar() ) // WHAT_IS_BUG in red Alert() box
RETURN
$STATUS$
R
$COMPLIANCE$
ReadVar() works exactly like CA-Cl*pper's ReadKey().
Note however,
that the <cVarName> parameter is not documented and used internally
by CA-Cl*pper.
$PLATFORMS$
All
$FILES$
Library is core
$SEEALSO$
@...GET, @...PROMPT, MENU TO, READ, SetKey(), __AtPrompt(), __MenuTo()
$END$
*/