in reply to Re: ABN checker
in thread ABN checker

Thanks for your suggestions, especially to reverse the logic and reduce surprise.

Replies are listed 'Best First'.
Re^3: ABN checker
by Marshall (Canon) on Feb 06, 2019 at 12:06 UTC
    I like the code from choroba, he posted that code while I was still writing mine.

    Some notation comments: Instead of "ChkABN", I would use "isABN". That is a common convention that makes it clear that this is a yes/no question, usually >0 or 0 for return value (any non zero value is "true").

    I would reserve any variable name that starts with a capital letter for a Class.

    I personally like the style that choroba use for naming (all lower case and _ for separation). is_ABN() would be a good name for me.