Category : Pascal Source Code
Archive   : VCARD.ZIP
Filename : VERICARD.PAS

 
Output of file : VERICARD.PAS contained in archive : VCARD.ZIP
Unit Vericard;


{$F+,D+,L+}



Interface


Function Vc(c : string) : char;


Implementation



Function Vc(C : String) : Char;
var
card : string[21];
Vcard : array[0..21] of byte absolute card;
Xcard : Integer;
Cstr : String[21];
y,x : integer;


Begin

x:=0;

Cstr:=' ';

Cstr:='';

Fillchar(Vcard,22,#0);

Card:=C;

for x:=1 to 20 do if Vcard[x] IN ([48..57]) then Cstr:=Cstr+chr(Vcard[x]);

Card:='';

Card:=Cstr;

Xcard:=0;

if NOT odd(length(card)) then

for x:=length(card)-1 downto 1 do
begin
if odd(x) then y:=((Vcard[x]-48)*2) else y:=(Vcard[x]-48);
if y>=10 then y:=((y-10)+1);
Xcard:=(Xcard+y);
end else for x:=length(card)-1 downto 1 do
begin
if odd(x) then y:=(Vcard[x]-48) else y:=((Vcard[x]-48)*2);
if y>=10 then y:=((y-10)+1);
Xcard:=(Xcard+y);
end;

x:=(10-(Xcard MOD 10));

if (x=10) then x:=0;

if x=(Vcard[length(card)]-48) then Vc:=Cstr[1] else Vc:=#0;

end;

end.







  3 Responses to “Category : Pascal Source Code
Archive   : VCARD.ZIP
Filename : VERICARD.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/