Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 lowercase letters
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
pwnapple




PostPosted: Tue Jan 24, 2006 9:00 am   Post subject: lowercase letters

how do i make the input to all lowercase letters?
thx[/code]
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Tue Jan 24, 2006 10:24 am   Post subject: (No subject)

For this you'll need some chr()'ing and some ord()'ing.
e.g.

code:

put ord('1')   % --> 49
put chr(34)   % --> "


Next, you'll want to look at each letter at a time, do a bit of maths with the numbers, and output the desired sequence of letters. Yes, I'm keeping this cryptic, because this is a simple problem that you should be able to solve on your own - now that you have the chr/ord.
do_pete




PostPosted: Tue Jan 24, 2006 11:11 am   Post subject: (No subject)

Or you could use Str.Lower (string) if you have a version of Turing that has that
Andy




PostPosted: Tue Jan 24, 2006 12:07 pm   Post subject: (No subject)

maybe its just me, but i dont think you should use any functions that you cant recreate yourself
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: