Difference between revisions of "USED()"
From Lianjapedia
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to determine if a table is open | Function to determine if a table is open | ||
− | |||
==Syntax== | ==Syntax== | ||
USED([<expN> | <expC>]) | USED([<expN> | <expC>]) | ||
− | |||
==See Also== | ==See Also== | ||
− | [[ALIAS()]], [[DBF()]], [[INUSE()]], [[NDX | + | [[ALIAS()]], [[DBF()]], [[INUSE()]], [[NDX()]], [[SELECT()]], [[SET CACHELOAD]], [[SET DCACHE]], [[SET EXCLUSIVE]], [[USE]] |
==Description== | ==Description== | ||
The USED() function with no parameter specified, returns .T. if there is a table open in the current workarea and .F. if the current workarea is empty. The <expN> is a numeric expression giving a workarea number in which to check for an open table. The <expC> is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias in which to check for an open table. The alias can be specified in the USE command. If not specified, the table basename is used. | The USED() function with no parameter specified, returns .T. if there is a table open in the current workarea and .F. if the current workarea is empty. The <expN> is a numeric expression giving a workarea number in which to check for an open table. The <expC> is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias in which to check for an open table. The alias can be specified in the USE command. If not specified, the table basename is used. | ||
− | |||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | |||
− | |||
− | |||
− | |||
? select() | ? select() | ||
1 | 1 | ||
? used() | ? used() | ||
.T. | .T. | ||
− | ? used(" | + | ? used("products") |
.T. | .T. | ||
? used(5) | ? used(5) | ||
Line 30: | Line 23: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Table Basics]] | [[Category:Table Basics]] | ||
[[Category:Table Basics Functions]] | [[Category:Table Basics Functions]] |
Revision as of 09:10, 10 February 2012
Contents
Purpose
Function to determine if a table is open
Syntax
USED([<expN> | <expC>])
See Also
ALIAS(), DBF(), INUSE(), NDX(), SELECT(), SET CACHELOAD, SET DCACHE, SET EXCLUSIVE, USE
Description
The USED() function with no parameter specified, returns .T. if there is a table open in the current workarea and .F. if the current workarea is empty. The <expN> is a numeric expression giving a workarea number in which to check for an open table. The <expC> is a character expression giving a workarea letter, (A-Z/a-z excluding M/m) or a table alias in which to check for an open table. The alias can be specified in the USE command. If not specified, the table basename is used.
Example
? select() 1 ? used() .T. ? used("products") .T. ? used(5) .F.