Goto: 4C Home | 4C Docs | 4C External Libraries Home | FCJSon Home | FCJSon Function List ArrayAddDouble()

ArrayAddDouble()

Purpose:
FCJSon::ArrayAddDouble() adds a simple double value to the end of an array
Usage:
rc = FCJSon::ArrayAddDouble(<jsonident>,<fval or dpyval> [, <dpyval>]);
Arguments:

integer <jsonident> - Ident of the array being modified

float or alpha <fval or dpyval> - The value to assign to the double value in the new object.
See notes below about this argument and 4csrvr versions.

alpha <dpyval> - An optional string to use when outputting. This value will usually be contructed from a sys.fmt_float() call.
Returns:
integer <rc>
0 - OK
-1 - Error
Where Used:
FCJSon::ArrayAddDouble() can be called anytime you have a valid ident to a json array.
Example:
Example
Description:
FCJSon::ArrayAddDouble() adds a simple double value to the end of an array
Bugs/Features/Comments:
4csrvr version 6.7.3-01 and later allow the <fval or dpyval> argument to be an alpha represenation of the double value and it is interpreted as both the value to store into the double object and the value to display when the json object is output to a file or 4c field. In this case, it is not necessary to specify the <dpyval> as a separate argument since both the double value and the display value are set with this single argument

Versions earlier than 6.7.3-01 must pass a float type for this argument and must specify the <dpyval> argument if the display value when outputting should be different than the default formatting used by the json-c library.
See Also:
FCJSon Function List


Back to Top