Difference between revisions of "WORKAREA()"
From Lianjapedia
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return the lowest available workarea number | Function to return the lowest available workarea number | ||
− | |||
==Syntax== | ==Syntax== | ||
WORKAREA() | WORKAREA() | ||
− | |||
==See Also== | ==See Also== | ||
− | [[ALIAS()]], [[DBRELATION()]], [[DBRSELECT()]], [[DBFILTER()]], [[SELECT]], [[SELECT() | + | [[ALIAS()]], [[DBRELATION()]], [[DBRSELECT()]], [[DBFILTER()]], [[SELECT]], [[SELECT()]], [[USE]], [[USED()]] |
− | + | ||
==Description== | ==Description== | ||
The WORKAREA() function returns the number of the lowest available workarea which is not in use. If all workareas are in use, it returns -1. The WORKAREA() function returns the number of the free workarea but it does not select that workarea. To determine the first free workarea AND select it, use SELECT 0 or SELECT WORKAREA(). | The WORKAREA() function returns the number of the lowest available workarea which is not in use. If all workareas are in use, it returns -1. The WORKAREA() function returns the number of the free workarea but it does not select that workarea. To determine the first free workarea AND select it, use SELECT 0 or SELECT WORKAREA(). | ||
− | |||
==Example== | ==Example== | ||
Line 26: | Line 22: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:Cursor Functions]] |
Latest revision as of 04:47, 7 December 2012
Contents
Purpose
Function to return the lowest available workarea number
Syntax
WORKAREA()
See Also
ALIAS(), DBRELATION(), DBRSELECT(), DBFILTER(), SELECT, SELECT(), USE, USED()
Description
The WORKAREA() function returns the number of the lowest available workarea which is not in use. If all workareas are in use, it returns -1. The WORKAREA() function returns the number of the free workarea but it does not select that workarea. To determine the first free workarea AND select it, use SELECT 0 or SELECT WORKAREA().
Example
close databases select 1 use state.rdb ? workarea() 2 ? select() 1