Hi !
I have written a point of sale program using PB. My biggest problem or rather a tedious task for me is when a client wants to change the stationery they using.
I usually have the stationary printing embedded into the program and call it up using a subroutine called PRINT_NOW:
Eg:
PRINT_NOW:
PRINT_PORT$="1" : `this number could be sitting in a variable
OPEN"LPT"+PRINT_PORT$ FOR OUTPUT AS #20
Print#20,”The Acme Company”:’could also sit in a variables
Print#20,”Address One ”
Print#20,”Address Two”
Print#20,”……blah blah . . “ . .
Print#20,tab(40);”Sold At”;sold(1):’variable storing price item was sold
RETURN
What I need to know is :-
1) Instead of having this subroutine embedded in my main program source code can I have it as an external program that can be compiled separately when ever changes are made to it.
Eg: the tab(40) was changed to tab(20),more lines added to the stationery etc. . However the main compiled program stays intact and need not be compiled again when ever a change occurs in the stationery setting.
2) How would I call the PRINT_NOW program from the main program.
I really don’t fully understand the $link and #include functions and my aged mind can’t seem to figure out how a change in the PRINT_NOW code externally effects the main source code and how the exchange of variables occur (sold(1))
I feel stupid . . .
www.compubyte.co.za
------------------
BASit
www.witelafrica.net
[B][email protected]
I have written a point of sale program using PB. My biggest problem or rather a tedious task for me is when a client wants to change the stationery they using.
I usually have the stationary printing embedded into the program and call it up using a subroutine called PRINT_NOW:
Eg:
PRINT_NOW:
PRINT_PORT$="1" : `this number could be sitting in a variable
OPEN"LPT"+PRINT_PORT$ FOR OUTPUT AS #20
Print#20,”The Acme Company”:’could also sit in a variables
Print#20,”Address One ”
Print#20,”Address Two”
Print#20,”……blah blah . . “ . .
Print#20,tab(40);”Sold At”;sold(1):’variable storing price item was sold
RETURN
What I need to know is :-
1) Instead of having this subroutine embedded in my main program source code can I have it as an external program that can be compiled separately when ever changes are made to it.
Eg: the tab(40) was changed to tab(20),more lines added to the stationery etc. . However the main compiled program stays intact and need not be compiled again when ever a change occurs in the stationery setting.
2) How would I call the PRINT_NOW program from the main program.
I really don’t fully understand the $link and #include functions and my aged mind can’t seem to figure out how a change in the PRINT_NOW code externally effects the main source code and how the exchange of variables occur (sold(1))
I feel stupid . . .
www.compubyte.co.za
------------------
BASit
www.witelafrica.net
[B][email protected]
Comment