Results 1 to 9 of 9

Thread: Anybody have a IsHex() function? [Resolved]

Hybrid View

  1. #1
    PowerPoster VanGoghGaming's Avatar
    Join Date
    Jan 2020
    Location
    Eve Online - Mining, Missions & Market Trading!
    Posts
    2,642

    Talking Re: Anybody have a IsHex() function? [Resolved]

    20198 is valid Hex though, just because it doesn't contain any letters doesn't mean it's not Hex. The code above just tests whether a string contains only numbers and letters A through F.

  2. #2
    Addicted Member
    Join Date
    Sep 2022
    Posts
    135

    Re: Anybody have a IsHex() function? [Resolved]

    Okay, yes it could be hex - lol. In my case, I have a program that tests an instrument through a serial port. It mostly responds in decimal, but every now and then it "burbs" and responds in HEX.

    I had a similar For next loop to look for A-F, then I know the instrument burped, and to process the response accordingly.

    I went searching to see if there was a built-in "IsHex" function (which there isn't) and found this old message string.

    The bad thing is if the instrument "burps" and responds in hex, but without the A-F, I am going to get some wild data. - Hah, just ran in to that, but the program does detect Bull Shite data, well, mostly does.
    I do like the "Like" statement, but for now will stick with the for next statement
    Last edited by daveyk021; Oct 9th, 2024 at 02:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width