On 12-Jan-00, [EMAIL PROTECTED] wrote:
> I working on porting a small auction script I did last year in perl
> to REBOL. (Along with everything else!) Of course, the completed
> product will be posted to the library.
>
> One glitch is a sub-script I borrowed from elsewhere that validates
> the format of credit card numbers. I don't actually understand what
> it does, but it works. ("The secret is to bang the rocks together,
> guys!" - Adams)
It's generating a check sum. Part of the credit card number is a
checksum and the rest of the characters should generate the same
number. If you enter the wrong digit or transpose digits they won't
match. It will also reject almost all made up numbers for the same
reason.
Dan Arico
--
Mr. Cthulhu? This is the front desk with your
wake-up call.