Home | Forums | Articles | F@H
Help | Search | Members | Calendar | Forum Map | Cybervillage | Archive
Welcome Guest ( Log In | Register | Resend Validation Email )


>  IceTeks Forums -> Technology made cool -> Programming


  Archived - No replies allowed - start new thread insteadStart new topicStart Poll

>  Changing letters help ASAP!
Track this topic | Email this topic | Print this topic
chibitenshi_03
Posted: Feb 1 2004, 07:36 PM
Quote Post

Icicle

Group Icon

Group: IceTeks Newbies
Posts: 5
Member No.: 246
Joined: 4-January 04
Ice Cubes: 0



i need to make a program that when the user enters a it turns into b and so on. i know the code is chr(ord("a")+1) to change from a to b but what do i do for all the alphabets?
I have this so far:

var letter : string

loop
put "Enter the code:" ..
get letter
if letter = "a" then
put chr (ord ("a") + 1)
end if
end loop
PMEmail Poster Top
Red Squirrel
Posted: Feb 2 2004, 07:31 PM
Quote Post

ZOMG!

Group Icon

Group: Admins
Posts: 13 964
Member No.: 1
Joined: 18-December 02
Ice Cubes: 163183



I don't know turing, but I assume this is based on the ascii table, so it should be +1 for all characters, and +32 to make it capital (or I think it's -32, forget if the caps come first or not)

So the string ABCDEF would be turned to BCDEFG if you do +1.


--------------------
user posted image
http://www.redsquirrel.me my blog
http://www.uovalor.com AoS/ML Ultima Online Shard
PMEmail PosterUsers Website Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Programming | Next Newest »

Topic Options Archived - No replies allowed - start new thread insteadStart new topicStart Poll

 



[ Script Execution time: 0.0353 ]   [ 13 queries used ]   [ GZIP Enabled ]

< Home | Forums | Contact >