Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 179
  • Last Modified:

Format printer

Presently if I use the following command the output is a vertical set of numbers. Since I need to review the output of at least 400 numbers, I would like the printer to print for example 100 numbers across before a carriage return

The following prints only one number in each row
For J = 1 to 400
         Printer.print T(J)
Next J

2
8
51
256
36

Would like the following:
2,8,51,256,36..........
with a line feed between each row

I looked in the MSDN reference program and in 4 books, but I have not found the carriage return command to overcome the vertical printing nor how to configure the statement for printing in rows. The output is in real time and I am not reading from a file.

gonzal13(Joe)
0
gonzal13
Asked:
gonzal13
  • 5
  • 2
1 Solution
 
GrahamSkanRetiredCommented:
For J = 0 to 41
    for k = 1 to 10
         Printer.print T(J*10 + k); ' note the ";"
    next k
    Printer.print
Next J
0
 
GrahamSkanRetiredCommented:
For J = 0 to 39, obviously.

0
 
gonzal13RetiredAuthor Commented:
In the lines that you presented, you had a comment:
'note the ";"

I do not see it in the code.

gonzal13(Joe)
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
GrahamSkanRetiredCommented:
 |
  V
k); ' note the ";"
0
 
GrahamSkanRetiredCommented:
It looked better aligned in the edit box.
I'll try again

  |
  V
k); ' note the ";"
0
 
GrahamSkanRetiredCommented:
Actually I've looked again at your requirement & I realise that I am not  putting the commas in.

For J = 0 to 41
    for k = 1 to 9
         Printer.print T(J*10 + k) & ", ";
    next k
    Printer.print T(J*10 + 10)
Next J
0
 
gonzal13RetiredAuthor Commented:
Ok, works like a champ. Thanks

Gonzal13(Joe)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now