Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 135
  • Last Modified:

Change Characters

I'm making an program to hold all my passwords.
Example: I have an word WATCH and I want to change every letter seperated. So letter CHR(W) gives an number + 10 gives another ASCII code how do I get the number back in to an ASCII character. And I need to get the next letters ATCH.
0
CyberChild
Asked:
CyberChild
1 Solution
 
JimBob091197Commented:
Use the Ord & Chr functions.
Example:
Chr(65) -->  'A'
Ord('A') --> 65

Thus:
for i := 1 to Length(MyString) do
    MyString[i] := Chr(Ord(MyString[i]) + 10);

JB
0
 
CyberChildAuthor Commented:
It looks easy if you see the code.

Thanks,
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now