¿ªÔÆÌåÓý

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

Re: Simpl+ hex manipulation


 

I understand, that's the but ya part. :) I didn't mean the compiler, I meant what I saw and how leteral strings are represented when you write them out.

--- In Crestron@..., "Chip" <cfm@...> wrote:


Same thing if you stuff it in an SIO - double quotes on each end are ignored.

- Chip


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

Try firing this:

out="&#92;x03&#92;xE7";

Out into Simpl and watch the value in Debugger (in hex mode, of course),
and tell me what you see;)

On Wednesday, June 5, 2013, matt_rasmussen_2000 wrote:

**


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

--- In Crestron@... <javascript:_e({}, 'cvml',
'Crestron%40yahoogroups.com');>, "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@... <javascript:_e({}, 'cvml',
'Crestron%40yahoogroups.com');> [mailto:Crestron@...<javascript:_e({}, 'cvml', 'Crestron%40yahoogroups.com');>]
On Behalf
Of matt_rasmussen_2000
Sent: Wednesday, June 05, 2013 3:02 PM
To: Crestron@... <javascript:_e({}, 'cvml',
'Crestron%40yahoogroups.com');>
Subject: [Crestron] Re: Simpl+ hex manipulation





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

--- In Crestron@... <javascript:_e({}, 'cvml',
'Crestron%40yahoogroups.com');> <mailto:Crestron%40yahoogroups.com<javascript:_e({}, 'cvml', 'Crestron%2540yahoogroups.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@... <javascript:_e({}, 'cvml',
'Crestron%40yahoogroups.com');> <mailto:Crestron%40yahoogroups.com<javascript:_e({}, 'cvml', 'Crestron%2540yahoogroups.com');>>
,
"matt_rasmussen_2000" <mjrtoo@> wrote:

x$ = 03E7

val = HEXTOI(x$)

x = 999
string = ITOHEX(x)

That works right?

--- In Crestron@... <javascript:_e({}, 'cvml',
'Crestron%40yahoogroups.com');> <mailto:Crestron%40yahoogroups.com<javascript:_e({}, 'cvml', 'Crestron%2540yahoogroups.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




[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]

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