Re: how to print

new topic     » goto parent     » topic index » view thread      » older message » newer message

mark wrote:
> I am trying to print to the printer
> the code as 
> 
> integer printer
> printer = open ("lpt1","wb")
> puts(printer,"TESTING")
> close (printer)
> 
> actually i take these code from the Forum
> But nothing was printed
> Any help?
> Thanks you

Hi Mark

You might just need to send a linefeed to get the printer to print, eg:

puts(printer,"TESTING" & #0A) -- linefeed

A printer won't print anything until it sees a line feed or a form feed (#0C). 
It makes sense, because what if your next line is

puts(printer, " TESTING 1 2 3") 

and the printer has already started printing?

I'm not sure what the reason is for not printing when it sees the end of the
file though (as per your example).

Gary

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu