mhollander
22nd July 2003 16:56 UTC
Is there an ASC("A") = 65 equivalent function ?
is there a function that can convert ans asc char like A to its numerical constant.
IntFmt command shown in the manual shows me how to convert from the constant to the character counterpart but I need to work it the otherway.
:confused:
kichik
22nd July 2003 17:18 UTC
I'm afraid there isn't. You can use IntFmt in a loop or a plug-in.
mhollander
23rd July 2003 07:27 UTC
How can I then use IntFmt to convert the following
StartLoop:
; Code that retrieves the single character into $R2
...
...
...
IntFmt $R6 "????" $R7
; Where $R6 contains the ascii value of the character.
Goto StartLoop
BTW. what are the values one can use for format.
kichik
23rd July 2003 13:04 UTC
See this example of IntFmt:
http://nsis.sourceforge.net/archive/....php?pageid=61
The values possible are listed in the documentation. They are the same as printf's.
Mæster
14th July 2005 15:37 UTC
Re: Is there an ASC("A") = 65 equivalent function ?
Originally posted by mhollander
is there a function that can convert ans asc char like A to its numerical constant.
IntFmt command shown in the manual shows me how to convert from the constant to the character counterpart but I need to work it the otherway.
Had the same problem today and finally wrote a function called
CharToASCII to cover this:
http://nsis.sourceforge.net/wiki/CharToASCIIJoost Verburg
14th July 2005 16:18 UTC
You function is identical to the Asc function, but it does not convert to ASCII. The Asc function converts characters to the current Windows codepage, this also includes non-ASCII characters.
Mæster
14th July 2005 16:37 UTC
You function is identical to the Asc function, but it does not convert to ASCII.
Searched a lot and didnt found it. Where can I find it? If there already is an Asc function I will remove mine from the archive.
Joost Verburg
15th July 2005 12:22 UTC
I mean the VB Asc function. The only think I wanted to say is that the name of your function is not totally correct (since it doesn't convert to ASCII).