Fortunately Crestron used the same string escape codes as C, which is my
native language. AMX infuriates me with its ridiculous "'string', $20,
'escape', $20, 'codes', $0D, $0A". So does Extron, for that matter, with
its %0D. I also remember dealing with a 232 box (Calypso maybe?) that
wanted ASCII codes in decimal. Of all the ridiculous bases! Why not ask
for them in trinary, I know those about as well as decimal.
toggle quoted message
Show quoted text
On Thu, Jun 6, 2013 at 9:03 AM, Chip <cfm@...> wrote:
Y'mean there's a different way of writing things out besides
Crestron-speak? :)
- Chip
--- In Crestron@..., "matt_rasmussen_2000" <mjrtoo@...> wrote:
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="\x03\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:
\x03\xE7 isn't eight characters, its two, the \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 "\x03\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 =
\x39\x39\x39 in hex...i want string = \x03\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 =
"\x03\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
------------------------------------
Check out the Files area for useful modules, documents, and drivers.
A contact list of Crestron dealers and programmers can be found in the
Database area.
Yahoo!
Groups Links
--
Jeremy Weatherford