Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-03

Luhn algorithm implementation

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello,

I wrote a unit for Luhn algorithm using FPC, and I want to release it under LGPL.
This algorithm check validity of numbers such as credit cards, and ID numbers in some countries.

I'm attaching my unit, and I hope it will be added to FPC packages. I'm going to create also a credit card checker that uses this implementation, and I will release it as well.

I think this code can help a lot of developers who require such implementation, so instead that each developer
will implement it on their own, they can use this implementation.

Thanks,

Ido

Reply by email

Graeme Geldenhuys
to ik

2009/3/31 ik :

Show quoted text 5 lines
I wrote a unit for Luhn algorithm using FPC, and I want to release it under LGPL. This algorithm check validity of numbers such as credit cards, and ID numbers in some countries.

Maybe if you supply some unit tests (FPCUnit is included with FPC) to verify that the implementation is correct, it will stand a better chance of being added into FPC. Just a thought. ;-)

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

ik
to Graeme Geldenhuys

Here is the unit and a small test case together (don't worry it's not my credit card number :) )

Ido

Graeme Geldenhuys wrote 24 lines
2009/3/31 ik : > > I wrote a unit for Luhn algorithm using FPC, and I want to release it under > LGPL. > This algorithm check validity of numbers such as credit cards, and ID > numbers in some countries. Maybe if you supply some unit tests (FPCUnit is included with FPC) to verify that the implementation is correct, it will stand a better chance of being added into FPC. Just a thought. ;-) Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email