home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Jason Aller Floppy Collection
/
270.img
/
FORUM25C.ZIP
/
PASSWORD.SUB
< prev
next >
Wrap
Text File
|
1988-12-27
|
1KB
|
50 lines
Function getpassword:boolean;
VAR t:sstr;
begin
getpassword:=false;
dots:=true;
buflen:=15;
getstr;
if input=''
then exit
else begin
t:=input;
dots:=true;
writestr ('Re-enter for verification:');
if not match(t,input) then begin
writeln ('They don''t match!');
getpassword:=hungupon;
exit
end;
urec.password:=t;
getpassword:=true
end
end;
Function checkpassword (VAR u:userrec):boolean;
VAR tries:integer;
begin
tries:=0;
checkpassword:=true;
repeat
splitscreen (5);
top;
writeln (usr,'Password Entry');
writeln (usr,'User name: ',u.handle);
writeln (usr,'Password: ',u.password);
write (usr,'Has entered so far: ');
bottom;
dots:=true;
writestr (^M'Password please:');
unsplit;
if hungupon then begin
checkpassword:=false;
exit
end;
if match(input,u.password)
then exit
else tries:=tries+1
until tries>3;
checkpassword:=false
end;