(Login MCalkins) Moderator Posted Jul 17, 2012 6:51 AM
That's not the problem. As you discovered when you changed the LPRINT to PRINT, it is going to the subroutine.
I think it's most likely that the printing output is being queued. That is why it prints when the program ends. Perhaps, it's waiting until it has a full page to start printing? Hence, my CHR$(12) suggestion.
Entirely separate from the printer problems, I would suggest using a cleaner coding style.
Regards,
Michael
-----
DIM z(0 TO 10, 0 TO 3) AS STRING
DIM i AS STRING, p1 AS STRING, p2 AS STRING, p3 AS STRING
CLS
DO
i = INKEY$
PRINT "press v to view array data"
PRINT "press p to print array data"
PRINT "press e to exit pgm"
p1 = z(0, 0): p2 = z(0, 1): p3 = z(0, 2)
SELECT CASE i
CASE "e": END
CASE "v": GOSUB ViewArray
CASE "p": GOSUB PrintArray
END SELECT
LOOP