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

Username:   Password: 
 RegisterRegister   
 String help?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TokenHerbz




PostPosted: Thu Oct 27, 2005 3:57 am   Post subject: String help?

Cervantes your tut was awsome, but you know how hard it is to teach me :S

[/code]
var input : string(1)
var user_name: string := ""
var password: string := ""
var check_pass: string:= ""

put "Please enter a user name"
loop
getch (input)
put input ..
user_name+= input
exit when (input) = (KEY_ENTER)
end loop
put "Please enter a password"
loop
getch (input)
put "*" ..
password += input
exit when (input) = (KEY_ENTER)
end loop
put "Please re-enter your pass"
loop
getch (input)
put "*" ..
check_pass += input
exit when (input) = (KEY_ENTER)
end loop
if check_pass = password then
put "You registered sucessfully"
else
put "Your passwords dont match"
end if

put ""
put ""
put user_name
put password
put check_pass
[/code]


Few errors, 1 when i hit enter it makes it so theres another star add'd, and also, one of the sentances dosn't skip aline...

Blah, help me out?? i going to bed its late... Bye!
Sponsor
Sponsor
Sponsor
sponsor
beard0




PostPosted: Thu Oct 27, 2005 6:37 am   Post subject: (No subject)

If you want to avoid having it put a star when you hit enter, then put your exit statement before you put "*"..

When you post, and you see that you made a mistake with your BBCode, you can easily hit the edit button to fix it.
jamonathin




PostPosted: Thu Oct 27, 2005 6:58 am   Post subject: (No subject)

beard0 wrote:
When you post, and you see that you made a mistake with your BBCode, you can easily hit the edit button to fix it.

Or you could just paste your code, highlight it and click the code button, rather than typing it out.
beard0




PostPosted: Thu Oct 27, 2005 7:00 am   Post subject: (No subject)

jamonathin wrote:
beard0 wrote:
When you post, and you see that you made a mistake with your BBCode, you can easily hit the edit button to fix it.

Or you could just paste your code, highlight it and click the code button, rather than typing it out.


If you're using Firefox (and you should be), that feature does not work.
[Gandalf]




PostPosted: Thu Oct 27, 2005 2:49 pm   Post subject: (No subject)

beard0 wrote:
and you should be

You better be! Wink

So many things that don't work in Firefox, name glows, blue scrollbar, code thing (above), and others. Hope v3 improves on this.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: