¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Simpl+ hex manipulation


 

somewhat in my defense I look at anything in "" to be a literal string, but ya :-)

--- In Crestron@..., "Steve Kaudle" <skaudle@...> wrote:

&#92;x03&#92;xE7 isn't eight characters, its two, the &#92;x is an identifier that says
'the next two characters = one byte'



From: Crestron@... [mailto:Crestron@...] On Behalf
Of matt_rasmussen_2000
Sent: Wednesday, June 05, 2013 3:02 PM
To: Crestron@...
Subject: [Crestron] Re: Simpl+ hex manipulation





ITOHEX(999) = "3E7" do you really need that to be "&#92;x03&#92;x07" (8 characters)?

--- In Crestron@... <mailto:Crestron%40yahoogroups.com> ,
"prunier514" <jprunier@> wrote:

It's not worling like i want.
because the result is string = 999 in ASCII but it is string =
&#92;x39&#92;x39&#92;x39 in hex...i want string = &#92;x03&#92;xE7

Finally i found a solution, like this:
integer i=atoi(x$) ----- i=999d/03E7h
integer hi= i/256
integer lo= i MOD 256
string = chr(hi)+chr(lo)

Working good!

--- In Crestron@... <mailto:Crestron%40yahoogroups.com> ,
"matt_rasmussen_2000" <mjrtoo@> wrote:

x$ = 03E7

val = HEXTOI(x$)

x = 999
string = ITOHEX(x)

That works right?

--- In Crestron@... <mailto:Crestron%40yahoogroups.com> ,
"prunier514" <jerome.homeprog@> wrote:

Hi guys,

First,I have a string. For example: string stringtest = "&#92;x03&#92;xE7";
Finally: I want take the both hex value of stringtest to put together
(so, I want 03E7)and convert this value in an integer to have 999 at the
end.
Any suggestions?
Thx for time





Join [email protected] to automatically receive all group messages.