Help in a Simple Program

new topic     » topic index » view thread      » older message » newer message

This program was in Euphoric Mysteries book, I just added whatever to stop the program at the end. When I enter Euphoria as password when program runs it shows Access Denied. But when I change password=password[1..length(password)-2], then it works fine. Why???

object password, whatever 
 
puts(1,"Enter your password: ") 
password = gets(0) 
 
password = password[1..length(password)-1] 
 
if compare(password,"Euphoria")=0 then 
  puts(1,"[Password Authenticated]") 
else 
  puts(1,"[Incorrect password - Access Denied!]") 
end if 
 
whatever=gets(0) 

[edit: added eucode tags. --Matt]

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu