/home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Algorithm-CheckDigits/blib/html/site/lib/Algorithm/CheckDigits/M09_001.html


DESCRIPTION</PRE> <P> <H2><A NAME=``algorithm''>ALGORITHM</A></H2> <OL> <LI> Letters are replaced with their position in the alphabet ('A' = 1, ...). <P></P> <LI> The total of the digits of all numbers is computed. <P></P> <LI> This sum is taken modulo 9. <P></P> <LI> The check digit is the difference between 8 and the number of step 3. <P></P></OL> <P>To validate the last digit of the total of the digits of all numbers inclusive check digit must be 8.</P> <P> <H2><A NAME=``methods''>METHOD/A</H2> <DL> <DT><STRONG><A NAME=``item_is_valid''><CODE>is_valid($number)</CODE></A></STRONG><BR> <DD> Returns true only if <CODE>$number</CODE> consists solely of numbers and the last digit is a valid check digit according to the algorithm given above. <P>Returns false otherwise,</P> <P></P> <DT><STRONG><A NAME=``item_complete''><CODE>complete($number)</CODE></A></STRONG><BR> <DD> The check digit for <CODE>$number</CODE> is computed and concatenated to the end of <CODE>$number</CODE>. <P>Returns the complete number with check digit or '' if <CODE>$number</CODE> does not consist solely of digits.</P> <P></P> <DT><STRONG><A NAME=``item_basenumber''><CODE>basenumber($number)</CODE></A></STRONG><BR> <DD> Returns the basenumber of <CODE>$number</CODE> if <CODE>$number</CODE> has a valid check digit. <P>Return '' otherwise.</P> <P></P> <DT><STRONG><A NAME=``item_checkdigit''><CODE>checkdigit($number)</CODE></A></STRONG><BR> <DD> Returns the checkdigit of <CODE>$number</CODE> if <CODE>$number</CODE> has a valid check digit. <P>Return '' otherwise.</P> <P></P></DL> <P> <H2><A NAME=``export''>EXPORT</A></H2> <P>None by default.</P> <P> <HR> <H1><A NAME=``author''>AUTHOR</A></H1> <P>Mathias Weidner, &lt;<A HREF=``mailto:mathias@weidner.in-bad-schmiedeberg.de''>mathias@weidner.in-bad-schmiedeberg.de&gt;</P> <P> <HR> <H1><A NAME=``see also''>SEE ALSO</A></H1> <P><A HREF=``../../../../bin/perl.html''>the perl manpage</A>, <A HREF=``../../../../site/lib/CheckDigits.html''>the CheckDigits manpage</A>, <EM>www.pruefziffernberechnung.de</EM>.</P> <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%> <TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR=``#cccccc''> <FONT SIZE=+1><STRONG><P CLASS=block>&nbsp;CheckDigits::M09_001 - compute check digits for Euro notes</P></STRONG></FONT> </TD></TR> </TABLE>

</BODY>

</HTML>

 /home/cpanrun/depot/main/contrib-patched/perl/CPAN/src/Algorithm-CheckDigits/blib/html/site/lib/Algorithm/CheckDigits/M09_001.html