Ask a Question

Ord function in delphi script (TC 6.52)

SOLVED
d_jeziorski
New Contributor

Ord function in delphi script (TC 6.52)

Hello,

I have a question. Does any one have script that would convert ascii code into a character. It's the function which is opposite to the chr() function   



--

Dominik
1 ACCEPTED SOLUTION

Accepted Solutions
AlexanderM
Staff

RE: Ord function in delphi script (TC 6.52)

Hi Dominik,




Try using the Ord function:




[DelphiScript]




...

    Log.Message(Ord('A'));

    Log.Message(Ord('&')); 

...

-----

Alexander
Customer Care Manager

View solution in original post

4 REPLIES 4
AlexanderM
Staff

RE: Ord function in delphi script (TC 6.52)

Hi,




You can use a combination of the pound sign and decimal ASCII code like in the following example:




[DelphiScript]

ShowMessage(#72#101#108#108#111#32#119#111#114#108#100);

-----

Alexander
Customer Care Manager
d_jeziorski
New Contributor

RE: Ord function in delphi script (TC 6.52)

Hello,



Actually I would like to have script that would convert for example A letter to 65 in decimal & to to 38 etc.



--

Dominik Jeziorski
AlexanderM
Staff

RE: Ord function in delphi script (TC 6.52)

Hi Dominik,




Try using the Ord function:




[DelphiScript]




...

    Log.Message(Ord('A'));

    Log.Message(Ord('&')); 

...

-----

Alexander
Customer Care Manager

View solution in original post

d_jeziorski
New Contributor

RE: Ord function in delphi script (TC 6.52)

Hello,



My bad haven't found it in help.



--

Dominik
cancel
Showing results for 
Search instead for 
Did you mean: