ZENIT POLAR

Just starting out? Need help? Post your questions and find answers here.
sabater
User
User
Posts: 33
Joined: Wed Jul 13, 2005 3:40 am

ZENIT POLAR

Post by sabater »

I want make a program for transform a letter in other. For Exemple. Transform all the "A" of a string in "I". How in the ZENIT POLAR.
Example. I have a sentence. "My Name is Valter"
Then in zenit polar is "My Limo as Vinrot"
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Post by Fou-Lu »

Are you really from Brazil? (I'm brazilian)

Use this procedure (by me!):

Code: Select all

Procedure.s zenit_polar(mystring.s)
mystring2.s=""
lenght=len(mystring)
for n=1 to lenght
ascii=asc(mid(mystring,n,1))
select ascii
case 90:ascii=80;  "Z" to "P"
case 69:ascii=79;  "E" to "O"
case 78:ascii=76;  "N" to "L"
case 73:ascii=65;  "I" to "A"
case 84:ascii=82;  "T" to "R"
case 122:ascii=112;  "z" to "p"
case 101:ascii=111;  "e" to "o"
case 110:ascii=108;  "n" to "l"
case 105:ascii=97;  "i" to "a"
case 116:ascii=114;  "t" to "r"
case 80:ascii=90;  "P" to "Z"
case 79:ascii=69;  "O" to "E"
case 76:ascii=78;  "L" to "N"
case 65:ascii=73;  "A" to "I"
case 82:ascii=84;  "R" to "T"
case 112:ascii=122;  "p" to "z"
case 111:ascii=101;  "o" to "e"
case 108:ascii=110;  "l" to "n"
case 97:ascii=105;  "a" to "i"
case 114:ascii=116;  "r" to "t"
endselect
mystring2=mystring2+chr(ascii)
next n
procedurereturn mystring2
endprocedure

a.s="Polar Zenit pOLAR zENIT"
debug a
a = zenit_polar(a)
debug a
a="My name is Valter"
debug a
a = zenit_polar(a)
debug a
Good luck! :D

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
sabater
User
User
Posts: 33
Joined: Wed Jul 13, 2005 3:40 am

Post by sabater »

Oh, Thanks Fou-Lu.
Your code work OK
-----
Yes. I'm Brazillian. :P
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Post by Fou-Lu »

You're welcome. :wink:
~*~
Where from Brazil?

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
sabater
User
User
Posts: 33
Joined: Wed Jul 13, 2005 3:40 am

Post by sabater »

Hi, Fou-lu.
I'm from Parana.
-----------------
Se você tiver o messenger, me adicione. :P
User avatar
Fou-Lu
Enthusiast
Enthusiast
Posts: 201
Joined: Tue Jul 12, 2005 8:30 am
Location: I'm pretty sure this is all a nightmare
Contact:

Post by Fou-Lu »

I'm from Rio, I thought we could even know each other. :P
But Parana is a bit far...
Sorry, i don't have messager :( But I'm always at the forums. You can also mail me! :D

~Fou-Lu (aka Lørd Cinneris (actually Elias Sant'Ana))

Image Image
Post Reply