AllExperts > Experts 
Search      

Pascal

Volunteer
Answers to thousands of questions
 Home · More Questions · Answer Library  · Encyclopedia ·
More Pascal Answers
Question Library

Ask a question about Pascal
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
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.

 
   

You are here:  Experts > Computing/Technology > Pascal > Pascal > Password in pascal

Topic: 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)

MAK

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.