NAME

cx_binaryvalue - return the binaryvalue of an object

SYNOPSIS: ANSI-C USAGE

#include "cx.h"
cx_Binary cx_stringvalue(cx_Integer *plen, cx_Object ob);

SYNOPSIS: FORTRAN USAGE

include 'cx_f.inc'
integer*4 ob
character*(*) bin, cx_f_binaryvalue()
bin = cx_f_binaryvalue(ob)

Description

Returns the binary value of the given object `ob' and its length. In principle this is a polymorphic function, but in this release it only operates on binary objects.

Return Value

Returns a cx_Binary and fills *plen with a cx_Integer length.

Diagnostics

NULL is quietly returned and *plen is set to 0 if object `ob' is NULL or its object type does not have a defined stringvalue (i.e., ob is not a binary object).

NULL is returned and a panic message is generated if the process is out of memory.

Related topics

cx_create_binary(3cx) cx_create_string(3cx) cx_parse_binary(3cx) cx_stringvalue(3cx)

Bugs

It would be more consistent if all object types had defined binaryvalue's, especially strings.
Back to index.