[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+----------+###############################################################
#+-| GET_ID() |---------------------------------------------+#################
#| +----------+ Returns the ID number associated with a GET |#################
#+----------------------------------------------------------+#################
##############################################################################
##############################################################################
#+--| Summary |------------+##################################################
#| #INCLUDE io.hdr |##################################################
#+-------------------------+##################################################
##############################################################################
##############################################################################
#+--| Syntax |----------------------------+###################################
#| FUNCTION UINT get_id PROTOTYPE |###################################
#+----------------------------------------+###################################
##############################################################################
##############################################################################
#########+---| Description |----------------------------------------+#########
#########| Returns the ID number associated with a GET. When a GET |#########
#########| is issued, an optional ID may be specified. To get the |#########
#########| current ID, use get_id(). |#########
#########| -------------------------------------------------------- |#########
#########| If an optional ID is not specified during the GET, each |#########
#########| GET is sequentially numbered starting at 1. |#########
#########| -------------------------------------------------------- |#########
#########| get_id() allows a program to determine which GET is |#########
#########| active during a READ. This helps in programming |#########
#########| standard filters or keyboard handlers. |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * get_id() allows a program to determine which |#########
#########| * GET is active during a READ. |#########
#########| |#########
#########| FUNCTION UINT print_active_get |#########
#########| ? "GET #" + i_val( get_id() ) |#########
#########| RETURN lastkey() |#########
#########| ENDPRO |#########
#########| |#########
#########| {...} |#########
#########| @ x1,y1 GET a FILTER print_active_get() |#########
#########| @ x2,y2 GET b FILTER print_active_get() |#########
#########| READ |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Use get_id() to activate context sensitive help. |#########
#########| |#########
#########| FUNCTION UINT give_help |#########
#########| IF lastkey() = &K_F1 |#########
#########| DO CASE |#########
#########| CASE get_id() = 1 |#########
#########| {...} |#########
#########| CASE get_id() = 2 |#########
#########| {...} |#########
#########| ENDCASE |#########
#########| ENDIF |#########
#########| RETURN lastkey() |#########
#########| ENDPRO |#########
#########| |#########
#########| @ 10,1 SAY "Name: "GET a->name FILTER give_help ID 1 |#########
#########| {...} |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
@...GET
READ
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson