LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NUL String

I have a string combo box.  Is it possible to have the ascii "NUL" (00 in hex) as a selection in the combo box?  I need the combo box to select a list of strings, but I also need the NUL option, since I need the hex number x00 sometimes. 

 

string => hex equivalent

NA => x00

string1 =>hex equivalent

string 2 =>hex equivalent

string 3 =>hex equivalent

 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 4
(2,847 Views)

I guess the empty string constant is equal to a NUL string.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 4
(2,837 Views)

Use the normall string NULL, in the event (or after the control) you check if the value equals to NULL, and then you output x00.

This can be easily done in a sub-vi.

 

Ton

 

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 3 of 4
(2,831 Views)

@COq Rouge wrote:

I guess the empty string constant is equal to a NUL string.


No it's not, an empty string has lenght 0, a string with the value NULL has a length of 1.

 

However in C, a NULL string is an empty string since they are NULL-terminated.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 4
(2,828 Views)