About Mohammed Expertise Simply put, I`ve used pascal for many years now. I`m assiting professors at the American University In Cairo regarding pascal.
Expert: Mohammed Date: 10/27/2004 Subject: Password in pascal
Question Dear Sir
Im making a program in Pascal and (I want to adress that im new on programing) and I want it to be password protected but I have no idea how to insert a password or to be cripted, what I know from basic learning is by using If's, but dont know if I'm on the right track
I apreciate a lot your help Sir
Carlos
Answer Hi Carlos,
the simplest way to do so is indeed to use an if statement.
Begin
if (password="password123") then
<Enter your program here>
else writeln("You have entered a wrong password.");
End.
Note that password is a string variable and that the password for your program in this case is password123
I hope this helps.
Good Luck with the programming field its worth a ride :o)