Author Topic: Plz help in printing a vector  (Read 8596 times)

nobody

  • Guest
Plz help in printing a vector
« on: November 21, 2007, 04:24:58 AM »
hi,
i want to know how to print a vector of 10 nbs(ie : Vec dd 10,20,21,...) as a string line with commas between every number.
i really need and appreciate ur help
thx

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Plz help in printing a vector
« Reply #1 on: November 21, 2007, 07:42:56 AM »
Well... print a number, print a comma (and perhaps a space), print the next number... until done.

All those calls to the OS are kinda crap. Better to write the whole thing to a buffer and print it all at once.

At 10 potential digits per number, plus the comma (and space), this could exceed the width of your screen. You might want to implement "word wrap"...

Have you got a routine to convert *one* number to text, or is that what you need?

Best,
Frank