I need to read a string say : FFCCBBAA
Then I need to make a number for each letter : 66332211
How I do this (doesnt work) is like this:
c := copy(input,1,1); {copies 1st character}
Obviously c is a string... so I cant run a CASE statement with it: CASE c OF <-- wrong type =(
So I tried val in vain:
val(c,i,e); {converts string to a numerical value}
But of course it returns all letters as 0...
Is there any way for me to copy from a string to a character? Is there any way for me to use a string in a case statement or is there any way for me to get a number from the val statement?
WAIT! ord(c) right? Nope =(
OK is there any way for me to use a string in the ord() statement?
All this is in TP7. Thanks
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."
Then I need to make a number for each letter : 66332211
How I do this (doesnt work) is like this:
c := copy(input,1,1); {copies 1st character}
Obviously c is a string... so I cant run a CASE statement with it: CASE c OF <-- wrong type =(
So I tried val in vain:
val(c,i,e); {converts string to a numerical value}
But of course it returns all letters as 0...
Is there any way for me to copy from a string to a character? Is there any way for me to use a string in a case statement or is there any way for me to get a number from the val statement?
WAIT! ord(c) right? Nope =(
OK is there any way for me to use a string in the ord() statement?
All this is in TP7. Thanks
~*Gwar3k1*~
"To the pressure, everything's just like: an illusion. I'll be losing you before long..."