home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
database
/
pdx_ti2.arj
/
TI796.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
3KB
|
133 lines
PRODUCT : Paradox NUMBER : 796
VERSION : 2.0 & up
OS : DOS
DATE : August 12, 1992 PAGE : 1/2
TITLE : The SELECT Command for variables in Menu Choices
In menu equivalent scripts, (i.e. scripts that simulate menu
selections) menu selections are automated into scripts by placing
the menu choices in curly braces. For example this is a simple
query script:
{Ask} {table1} Check Do_it!
A problem arises when a menu choice is variable. If you wanted
to query different tables with the same script, you could use the
SELECT command to simulate selecting a table based on the value
of a PAL variable. Say you have five tables in the C:\DATA
directory which you would like to query in the same manner. You
could do table selection based on the assignment of the variable
'tbl' using the SHOWTABLES command. The following shows making a
table selection using the SELECT command.
_________________________________________________________________
SHOWTABLES ; show list of tables
"c:\\DATA"
"Highlight name of the table to query, then press Enter."
TO tbl ; assign tablename to tbl
{Ask} SELECT tbl CHECK ; select the table using
Do_it! ; the SELECT command
; or you could also use the ACCEPT command for user input.
_________________________________________________________________
@ 10,10 ?? "Enter a table's name for querying: " ; put a prompt
; on screen
ACCEPT "A8" REQUIRED TO tbl ; accept a value
; from user
IF NOT retval THEN ; retval = False if
RETURN "No Table selected" ; <Esc> was press
ENDIF
{Ask} SELECT tbl CHECKPLUS
Do_It!
PRODUCT : Paradox NUMBER : 796
VERSION : 2.0 & up
OS : DOS
DATE : August 12, 1992 PAGE : 2/2
TITLE : The SELECT Command for variables in Menu Choices
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.