Login Register






Usage of Chr? filter_list
Author
Message
Usage of Chr? #1
What exactly does a Chr do? Is it like codes for each letter? Like hex and binary?

Reply

RE: Usage of Chr? #2
converts a Decimal code to the string character assigned to it Smile
(This post was last modified: 11-25-2011, 05:19 AM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: Usage of Chr? #3
(11-25-2011, 04:01 AM)[ntdll.dll]x[advapi32.dll] Wrote: converts a hex code to the string character assigned to it Smile

Wrong, it actually converts Decimal values over to it's string value. Nothing to do with Hex values at all.
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Usage of Chr? #4
(11-25-2011, 04:47 AM)Infinity Wrote:
(11-25-2011, 04:01 AM)[ntdll.dll]x[advapi32.dll] Wrote: converts a hex code to the string character assigned to it Smile

Wrong, it actually converts Decimal values over to it's string value. Nothing to do with Hex values at all.
Your right sorry there i got it mixed up for a sec... and for getting the Decimal values you can use AscW Smile

like
Code:
Chr(AscW("a"))
(This post was last modified: 11-25-2011, 05:20 AM by Skullmeat.)
Pierce the life fibers with your drill.

Reply

RE: Usage of Chr? #5
I already created a powershell script to convert between string, and octal/hex/decimal. Even though this is an AutoIt scripting forum, I already have a sufficient method that works for me Smile

http://www.hackcommunity.com/Thread-Powe...onversions
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply

RE: Usage of Chr? #6
Thanks guys. That helped but what's the point of it? Is it just used as a substitute for the code incase you don't want someone to know what you used?

Reply

RE: Usage of Chr? #7
(11-25-2011, 10:11 PM)ReaperX Wrote: Thanks guys. That helped but what's the point of it? Is it just used as a substitute for the code incase you don't want someone to know what you used?

Mostly yes but also its sometimes used for having semicolon values in strings so like you want the value "hello" in your string which you can do:
Code:
$var = ""hello""
or
Code:
$var = Chr(34) & "hello" & Chr(34)
Pierce the life fibers with your drill.

Reply

RE: Usage of Chr? #8
Semicolon Values? They Just Use a Semicolon?

Reply

RE: Usage of Chr? #9
(11-27-2011, 11:52 PM)ReaperX Wrote: Semicolon Values? They Just Use a Semicolon?

In some languages it's a special character and can't be used in the string so you have to sneak it in there using Chr, otherwise they give you an escape character in that language to make the interpreter read it as a normal char. Like in perl with $, which needs to be escapes in a string to display as a normal "$"
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]

Reply