Difference between revisions of "Dbset()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 32: Line 32:
 
The dbset() function issues a Recital SET command, switching the specified setting 'on' or 'off'.
 
The dbset() function issues a Recital SET command, switching the specified setting 'on' or 'off'.
  
Note: The dbset() function currently only operates on the SET EXACT ON/OFF command.
+
Note: The dbset() function currently only operates on the [[SET EXACT]] command.
 +
 
  
 
==EXAMPLE==
 
==EXAMPLE==

Revision as of 09:51, 2 April 2009

PURPOSE

issue a Recital Set Command


SYNOPSIS

#include "dbl.h"
 
	int	dbset(keyword, value)
 
	<input parameters>
 
	char	*keyword;	/* Address of buffer containing SET keyword	*/
	int	value;		/* Value to set, 1 for on/true, 0 for off/false 		*/
 
	<output parameters>
 
	none


RETURN VALUE

The dbset() function returns 0 for success. Refer to the section on return codes for a detailed list of return code definitions.


DESCRIPTION

The dbset() function issues a Recital SET command, switching the specified setting 'on' or 'off'.

Note: The dbset() function currently only operates on the SET EXACT command.


EXAMPLE

The following example issues a SET EXACT ON. With SET EXACT OFF, strings are compared up to the length of the shorter string. With SET EXACT ON, the strings compared must be an exact match in both characters and length.

#include "dbl.h"
 
	int	rc;	/* Return code		*/
 
	rc = dbset("EXACT",1);
	if ( rc != 0 )  {
		printf("Error setting exact on; %dn", rc);
		exit(1);
	} else {
		printf("Exact set on!n");
	}


SEE ALSO

dbrun()