Menu

LPRINT

eric
2019-01-24
2020-04-26
  • eric

    eric - 2019-01-24

    I need to print a list of names from top to bottom of the page with date of birth in a list opposite each name. But I can't I can't get the date in a tidy list - each is indented depending on the length of the name. How can I control the printer please so the dates are listed in a straight vertical line.

    Allmy books ( on GW Basic ) deal with LPRINT in a couple of lines but to me, this problem is more difficult to solve than Brexit

    thanks!

    Eric WAlter
    Liverpool

     
  • Everton da Silva Marques

    How about this?

    10 read n$, birth$
    20 gosub 100
    30 print string$(20, "-"); " "; string$(20, "-")
    40 for i=1 to 3
    50 read n$, birth$
    60 gosub 100
    70 next
    80 end
    100 print n$; space$(20-len(n$)); " "; birth$
    110 return
    1000 data "NAME", "BIRTHDAY"
    1010 data "smith, john", "January 27, 2019"
    1020 data "denvers, carol", "February 10, 2018"
    1030 data "wayne, bruce", "March 30, 2017"
    

    Output:

    NAME                 BIRTHDAY
    -------------------- --------------------
    smith, john          January 27, 2019
    denvers, carol       February 10, 2018
    wayne, bruce         March 30, 2017
    
     

    Last edit: Everton da Silva Marques 2019-01-28
    • Cedric T Jemison

      Hi Everton da Silva Marques,

      You made have just gave me an idea on how to draw my dices side by side instead of top and bottom taking up vertical when running my program high roller. Your line 30 was the key to retype my lines and I can't wait too see how it will turn out.
      Thank You very much,

      Cedric T. Jemison

       
    • Cedric T Jemison

      Hi Everton,

      Well, I just learned something here, writing strings take up more typing space. With only 255 characters per line, using if then else statements may hinger my printing of side by dices. I'm using five program lines. My program called High Roller(Bonus Round Only) is in a separate topic under gerenal discussion.

      Thank you,

      Cedric T. Jemison