LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Handle NULL Return for a C-String Function Parameter for a CLF?

I've got a C function:

------------------------
Purpose

Returns the "value" (associated character data) for a node, or NULL if the
node has no data.

Syntax

const oratext* getNodeValue(const xmlnode *node)
----------------------------------------------------------

When I Configure a CLF for that, the natural thing is to characterize the
return value as "C String Pointer" -- but that doesn't allow me (in any
obvious way) to test for NULL (which is not a C String pointer).

If I call the return value a u32, I can do the test, but then can'rt see a
way to cast that to a string.

(I really do believe that the documentation means what is says (ie, aot that
it returns a pointer to an empty
string).)
0 Kudos
Message 1 of 2
(2,234 Views)
Apparently, LV doesn't distinguish between the return of a NULL pointer (to
a string) and the return of an empty string.

-- PMH



"P. Michael Hutchins" wrote in message
news:99av6l$4n0$1@news.draper.com...
> I've got a C function:
>
> ------------------------
> Purpose
>
> Returns the "value" (associated character data) for a node, or NULL if the
> node has no data.
>
> Syntax
>
> const oratext* getNodeValue(const xmlnode *node)
> ----------------------------------------------------------
>
> When I Configure a CLF for that, the natural thing is to characterize the
> return value as "C String Pointer" -- but that doesn't allow me (in any
> obvious way) to test for NULL (which is not a C String pointer).
>
> If I call the return value a u32, I can do t
he test, but then can'rt see a
> way to cast that to a string.
>
> (I really do believe that the documentation means what is says (ie, aot
that
> it returns a pointer to an empty string).)
>
>
>
0 Kudos
Message 2 of 2
(2,234 Views)