LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Function for searching non alphanumeric chars?

HI,
 
I'm checking contents of different fields and one of the requirements is that it contains only an alphanumeric characters.  I searched CVI for such function but could not find it.
 
Is there such a function?
If not, can you suggest a code to do it?
 
Thanks
Rafi
0 Kudos
Message 1 of 4
(3,385 Views)

The standard C library function int isalnum(int c) will do the trick.

Menchar

0 Kudos
Message 2 of 4
(3,384 Views)

Hi Menchar,

 

Thanks..that was exactly what I was looking for.  Now that I have it...I can see it in my book....

I understand it is part of the standard library, but where do you find all the functions of the standard library?

Another thing I'm looking for right now is how to convert Hex presentation to dec.  Is there a function for it in the standard library or, one must write a function to do it?

 

Thanks

Rafi

0 Kudos
Message 3 of 4
(3,362 Views)

Rafi,

What do you mean by hex presentation?  If you're talking output and are using printf/sprintf statements, then you can use the %i format modifier instead of %x.

If you are talking about in a CVI GUI, then double click on the field on the UIR panel.  Click the "format and precision" button and then change the "display format" field from hex to decimal.

If these don't solve it, give some more idea about what it is you meant.

 

0 Kudos
Message 4 of 4
(3,354 Views)