status.i4.v = expression_parse_double_c(expression_text.i1a.r,
						data_event.g.v, options.u4.v,, value.r8.r,

	This routine parses and optionally evaluates an algebraic
	or logical expression which can contain device names.  This
	expression can be evaluated by a call to

	expression_text	algebraic expression to parse  (Device names in
			an expression should have the following form:
			"x:xxxxxx[n]" where "n" represents an array index.
			If the array index is zero, the bracketed term can
			be omitted.  If an underscore (_) character is
			entered in place of the colon, the device's setting
			will be used in the calculation rather than the
			reading.  If a pipe (|) character is entered in
			place of the colon, the device's basic status will
			be used.) (The following instrinsic functions are
			also supported: "log" (base 10 log), "ln" (natural log),
			"sqrt" (square root), "sin" (sine), "cos" (cosine),
			"tan" (tangent), "round" (round), "trunc" (truncate),
			"prec" (precision eg. prec(value,fraction_digits)),
			"fract" (fraction), "abs" (absolute value),
			"exp" (e^n), "asin" (arc sine), "acos" (arc cosine),
			"atan" (arc tangent), "sinh" (hyperbolic sine),
			"cosh" (hyperbolic cosine),
			"tanh" (hyperbolic tangent), "or" (bitwise or),
			"and" (bitwise and), "xor" (exclusive or),
			"lor" (logical or), "land" (logical and),
			"lshft" (circular left shift), and
			"rshft" (circular right shift), "bit" (bit test),
			"min" (minimum), "max" (maximum).)
	text_length	total length of expression text  (If a value of zero
			is passed for this argument, the expression text will
			be treated as a single null terminated string.)
	subst_devices	array of substitute device names which replace
			device names in the expression having the form
			"G:DEVnnn" or "G_DEVnnn"
			(dio_get_terse_name_length characters per entry)
			 selected, there should be C_STYLE_DEVICE_NAME_LEN
			 characters per entry.)
			(A value of NULL can be passed for this argument
			 if no substitute device names are needed.)
	num_devices	number of substitute devices
	data_event_type	data event type
			(DIO_EVENT_TYPE_FTD -> Frequency Type Descriptor,
			 DIO_EVENT_TYPE_DATA_EVENT -> full-fledged data event)
	data_event	data event on which expression device data is collected
			If 'data_event_type' is DIO_EVENT_TYPE_FTD the
			following values can be supplied:
			(FTD_ONESHOT -> one shot,
			 FTD_DEFAULT -> use database default FTD,
			 FTD_1HZ -> 1 Hz request (Note: This value can be
				    multiplied by an integer constant to
				    retrieve data every "constant" seconds.),
			 FTD_EVENT_MASK OR'ed with TCLK event value -> read
			 on TCLK event (event constants are in 'tclk_events')
			 (can use the macro BUILD_EVENT_FTD(event) or
			  BUILD_EVENT_PLUS_DELAY_FTD(event,delay) in 'macro'))
			If 'data_event_type' is DIO_EVENT_TYPE_DATA_EVENT,
			an ASCII data event string should be supplied.
	options		execution options
			(EXPR_OPT_NONE -> no options selected, parse and
					  evaluate the expression,
			 EXPR_OPT_PARSE_ONLY -> parse, but do not evalute
						the expression,
			 EXPR_OPT_NO_STALE -> ignore stale data errors,
			 EXPR_OPT_SUBST_ARRAY_DEVICES -> substitute device
							 names can include
							 array indices
							 characters per entry))
	expr_stack	returned expression stack which can be evaluated
			by a call to expression_evaluate_c  (The memory
			for this data is allocated by this function and
			should be freed by the caller by calling
			expression_free_c when it is no longer needed.)
			(A value of NULL can be passed for this argument
			 if this information is not needed.)
	value		returned value of the expression  (This argument
			is only used if "options" does not have the value
			(A value of NULL can be passed for this argument
			 if this value is not needed.)
	units_text	returned device units text
			(LEN_DEV_UNITS characters)
			(A value of NULL can be passed for this argument
			 if units text is not needed.)
	error_string	returned error string (Allow at least 133 characters.)
			(A value of NULL can be passed for this argument
			 if this information is not needed.)

	This function returns ACNET status values as follows:

	OK			success
	CLIB_MEMFAIL		failed in allocating dynamic memory
	CLIB_SYNTAX		syntax error
	CLIB_INVSIZ		command line too long
	otherwise		other ACNET format error code

	This function requires the following include files:

	cbslib_h, acnet_errors_h

	Related functions:

	expression_evaluate_double_c, expression_parse_c,
	expression_evaluate_c, expression_free_c,
	expression_cancel_requests_c, expression_info_c,

	C/C++ usage:

	static const char	expression_text[] = "2 * M:OUTTMP + 3.5";
	char	units_text[LEN_DEV_UNITS];
	char	*subst_devices = (char *) NULL;
	char	error_string[133];
	const short	default_ftd = FTD_ONESHOT;
	int	status;
	int	text_length = 0;
	int	num_devices = 0;
	int	data_event_type = DIO_EVENT_TYPE_FTD;
	unsigned int	options = EXPR_OPT_PARSE_ONLY;
	double	value;
	void	*expr_stack;

	status = expression_parse_double_c(expression_text,text_length,
					   (void *) &default_ftd,options,

	status = expression_evaluate_double_c(expr_stack,EXPR_OPT_NONE,&value,

	status = expression_free_c(&expr_stack,options,error_string);