I understand a lot of POS (Point of Sale) terminals in my work. They mainly talk with the endpoint of the system, which is written in Java, which will be transmitted from the back system.
For receipts, we will write a code at the endpoint that will generate the data that needs to be printed. These receipts can only accept 40 characters per line, so we will basically print each type of receipt that needs to be printed.
What I would like to do is basically come up with a kind of script syntax that I could use to create these receipts.
My idea is to have a GUI program where you can create a receipt, for example
Welcome To John Doe Services Your current balance is $(F4).Format(currency)
Or something similar. With this, I could then interpret the syntax of $ (F4) .Format (currency) and actually pull the data and format it correctly.
I would like some advice where I should start to look at how to do this. I would like to write this in Java, but I'm not sure where to start. I would rather try to stay away from substring magic.
Thanks in advance.
EDIT: Sorry I should have mentioned, the software we are expanding was written in J ++, so I cannot use Java 5 or 6, the most recent Java I can use is 1.4
source share