Featured Post

Step Wise Project Planning

Planning is the most difficult process in project management. The framework described is called the Stepwise method to help to distinguis...

Write a program for logon routine using repeat predicate

Write a program for logon routine using repeat predicate.
Domains
name,password=symbol
predicates
getinput (name,password)
logon
user(name,password)
repeat
clauses
repeat.
repeat:-
repeat.
logon:-
clearwindow,
getinput (_,_),
write ("you are now logged on."),nl.
logon:-
repeat,
write ("Sorry, you are not permitted access."),nl,
write ("Please try again."),nl,
getinput (_,_),
write ("you are now logged on."),nl.
getinput (Name,Password):-
write ("Please enter your name:"),
readln (Name),nl,
write ("Please enter password:"),
readln (Password),nl,
user (Name,Password).
user (john,superman).
user (sue,happy).
user (bill,bigfoot).


Output:-

Previous
Next Post »