Difference between revisions of "SELECT()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return the current workarea number
 
Function to return the current workarea number
 
  
 
==Syntax==
 
==Syntax==
 
SELECT([<alias>])
 
SELECT([<alias>])
 
  
 
==See Also==
 
==See Also==
[[SELECT]], [[USE]], [[ALIAS()]], [[WORKAREA()]], [[READVAR()]], [[DBF()]]
+
[[ALIAS()]], [[DBF()]], [[SELECT]], [[USE]], [[WORKAREA()]]
 
+
  
 
==Description==
 
==Description==
 
The SELECT() function returns the number of the currently selected workarea.  If the optional <alias> is specified, the SELECT() function returns the workarea number for that alias.  If the <alias> specified does not exist, the SELECT() function will return a 0.
 
The SELECT() function returns the number of the currently selected workarea.  If the optional <alias> is specified, the SELECT() function returns the workarea number for that alias.  If the <alias> specified does not exist, the SELECT() function will return a 0.
 
  
 
==Example==
 
==Example==
Line 35: Line 31:
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 07:46, 10 February 2012

Purpose

Function to return the current workarea number

Syntax

SELECT([<alias>])

See Also

ALIAS(), DBF(), SELECT, USE, WORKAREA()

Description

The SELECT() function returns the number of the currently selected workarea. If the optional <alias> is specified, the SELECT() function returns the workarea number for that alias. If the <alias> specified does not exist, the SELECT() function will return a 0.

Example

close all
? select()
         1
use prefixes in 3
? select ("prefixes")
         3
 
// Another Example
// to access each open workarea
m_count=0
select 1
do while not empty(alias())
  m_count = m->m_count + reccount()
  select select() + 1
enddo
dialog box "Total records in all tables is &m_count"