Respond to this messageReturn to Index
Original Message
  • It is going to the subroutine
    • (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

      ViewArray:
      RETURN

      PrintArray:
      LPRINT CHR$(10): LPRINT p1$, , p2$, , p3$
      RETURN
    Your Name
    Your Email
    (Optional)
    Message Title
    Message Text
    Options Also send responses to my email address