Difference between revisions of "DBF ALIAS()"

From Recital Documentation Wiki
Jump to: navigation, search
 
 
(One intermediate revision by one user not shown)
Line 23: Line 23:
 
==DESCRIPTION==
 
==DESCRIPTION==
 
The DBF_ALIAS() function will return will return the alias name of the currently selected workarea as an upper case character string, or a NULL if no database is in use.
 
The DBF_ALIAS() function will return will return the alias name of the currently selected workarea as an upper case character string, or a NULL if no database is in use.
 
Recital provides you with 100 workareas by default, however, up to 256 may be set with the [[DB_MAXWKA]] environment variable / symbol.
 
  
  
Line 30: Line 28:
 
The following example returns the alias name of the current workarea, or executes the command specified in the first parameter if no database is open.
 
The following example returns the alias name of the current workarea, or executes the command specified in the first parameter if no database is open.
  
#include <stdio.h>
+
 
 
<code lang="c">
 
<code lang="c">
 +
#include <stdio.h>
 
#include "dbapi.h"
 
#include "dbapi.h"
  

Latest revision as of 16:55, 15 December 2009

PURPOSE

Return alias name


SYNONYM

api_dbf_alias()


SYNOPSIS

#include "dbapi.h"
 
char	*DBF_ALIAS()
 
<input parameters>
none
 
<output parameters>
none


DESCRIPTION

The DBF_ALIAS() function will return will return the alias name of the currently selected workarea as an upper case character string, or a NULL if no database is in use.


EXAMPLE

The following example returns the alias name of the current workarea, or executes the command specified in the first parameter if no database is open.


#include <stdio.h>
#include "dbapi.h"
 
dbapi_dbf_alias()
{
    char	*alias;
 
    alias = DBF_ALIAS();
 
    if ( alias == NULL) {
       COMMAND(_parc(1) );
       _retc("");
    } else {
       _retc( alias );
    }
}


SEE ALSO

DBF_DBF(), DBF_FMT(), DBF_INDEXKEY(), DBF_INDEXORDER(), DBF_ISEXCLUSIVE(), DBF_ISREADONLY(), DBF_NDX(), DBF_SELECT(), DBF_USED()