Is there command to do reverse of Chr()?
Posted: Tue May 24, 2022 7:57 pm
I can do:
and it will print A
However, I would need the reverse of this, is there something like:
Which would then return 65.
Does that exist?
I can only see Val() command that looks like it, but that looks like it makes a whole string into a table, and therefore won't work in my case where I have a number as a string, and I try to check if next one is "." or not, as in:
Problem here is that at the point when it is checking t_sum[n+1] <> ".", it will be attempting to compare a number with "." and throws an error.
I could do it some other way of course, but then it wouldn't fit into one line anymore, making the code messier to read, which it is enough already even now.
Code: Select all
Var = 65
debugprint(chr(var))However, I would need the reverse of this, is there something like:
Code: Select all
Var = "A"
Debugprint(ReverseofChr(var)Does that exist?
I can only see Val() command that looks like it, but that looks like it makes a whole string into a table, and therefore won't work in my case where I have a number as a string, and I try to check if next one is "." or not, as in:
Code: Select all
If t_sum[n] = 0 And HaveItem(t_sum, n+1) = True And t_sum[n+1] <> "." Then zeroestoremove = zeroestoremove + 1I could do it some other way of course, but then it wouldn't fit into one line anymore, making the code messier to read, which it is enough already even now.