COMMAND()
From Lianjapedia
Revision as of 09:23, 28 March 2013 by Yvonne.milne (Talk | contribs)
PURPOSE
Execute a command
SYNONYM
api_command()
SYNOPSIS
#include "lianjaapi.h" int COMMAND(command) <input parameters> char *command; /* Address of a buffer containing a valid command */ <output parameters> none
DESCRIPTION
The COMMAND() function will execute the specified command from within your 'C' function. This function returns 0 if successful, otherwise an error number.
EXAMPLE
The following example will open a table called accounts.
Example Lianja script:
m_result=open("use accounts") return
Example 'C' function:
#include "lianjaapi.h" lianjaapi_open() { if (_parinfo(1) == APICTYPE) { _retni(COMMAND(_parc(1))); } else { _retni(-1); } }