BEST OF ANTIC VOLUME 1 / PAGE 161
Your computer should be able to perform this task. Unfortunately, the translation of dollars and cents into English isn't as easy as just printing a number. I spent quite a while using the trial-and-error system to provide you with this program. I'm sure there must be a more efficient algorithm than the one I came up with, but this one does the job.
What I did was to store the English versions of the required numbers in the string N$, and the starting and ending locations of each number in the two dimensional array, N. You enter the number in the normal numeric format, and the program does the required translation. The translation subroutine begins at line 130 and ends at line 320. B$ is a string of 80 blanks, EA$ holds the translated English Amount, and AMOUNT$ stores the numeric amount you enter through the keyboard.
The program will tell you what it wants and includes error-handling routines. The BREAK key and SYSTEM RESET have been left operational.
I haven't gone so far as to actually print your checks, but I have taken care of the tricky part. Add your own inputs for date and payee, position your data according to the layout of your check form, and put your ATARI to work. When you actually print checks, please remember that Jerry starts with a "J."
by Jerry White
Listing: TRANSLAT.BAS Download