To all,
Attached is a generic UPC-A Barcode font function that converts a barcode number to a character string that will display a barcode for a UPC-A barcode font.
As any particular UPC-A barcode font may be mapped differently depending upon which one you use (e.g. with and without numbers, with and without explicit left and right guard characters), it has one internal variable (Fontpos)that needs to be changed based upon what barcode font you use.
The entire text of the UPCAFont.scp file that is in the attached ZIP file should be copied verbatim into a global function called UPCFont that you would create in Alpha 5.
Then just read the comments for how to use it.
The code shows a number of techniques that others may find useful in their functions. It uses an internal function at the bottom to perform a validation of the number. It also uses a simple technique to translate characters.
It has 55 lines of real code with extensive error checking and validation in the 2 functions (Main function and internal function). It also is heavily documented as most code should be (when you have the time to do it! Clients don't normally like to pay for this level of documentation)
Regards,
Ira J. Perlow
Computer Systems Design & Associates
[email protected]
Attached is a generic UPC-A Barcode font function that converts a barcode number to a character string that will display a barcode for a UPC-A barcode font.
As any particular UPC-A barcode font may be mapped differently depending upon which one you use (e.g. with and without numbers, with and without explicit left and right guard characters), it has one internal variable (Fontpos)that needs to be changed based upon what barcode font you use.
The entire text of the UPCAFont.scp file that is in the attached ZIP file should be copied verbatim into a global function called UPCFont that you would create in Alpha 5.
Then just read the comments for how to use it.
The code shows a number of techniques that others may find useful in their functions. It uses an internal function at the bottom to perform a validation of the number. It also uses a simple technique to translate characters.
It has 55 lines of real code with extensive error checking and validation in the 2 functions (Main function and internal function). It also is heavily documented as most code should be (when you have the time to do it! Clients don't normally like to pay for this level of documentation)
Regards,
Ira J. Perlow
Computer Systems Design & Associates
[email protected]