Re: printing variable problems




Marco van de Voort <marcov@xxxxxxxx>said

On 2006-04-12, Klaus Jorgensen <kj@xxxxxxx> wrote:
I'm no expert in proportional fonts, but are you telling me that
printing a string that is prefixed with a given number of space
characters, does not always start at the same position?

Will the printer print the xxx's on a different position if printed as
follows:
writeln(space(30),'xxx iiiiiiii');
writeln(space(30),'xxx mmmmmmmm');

No, but the "iiii" and "mmm" section have different lengths, and

writeln('i',space(30),'xxx iiiiiiii');
writeln('w',space(30),'xxx mmmmmmmm');

typically goes wrong.

More importantly, the OP wants (needs) a multi column facility, even if
not for two different descriptions on one line (cannot see why that is
necessary) but certainly for a Quantity, Description, Price, (VAT), Line
total . . . so a minimum of 4 and probably more 'Tabs' that align
correctly - and with money the decimal point needs to be aligned (for a
professional appearance).

To achieve this I spent many hours writing routines to
Align_Right(x.x,x.x), H_Pos(x.x), Print_Money(xx.x,x.x), Set_Face('T'),
set_Point(x), Print_Date(date_variable), etc.

The Esc P2 codes are readily available for Epson Printers, many of which
are common to the full range. Some of course are specific to the
features/capabilities of particular models.

JG
.



Relevant Pages

  • Re: Probably simple problem with networking
    ... printing over 300 blank characters, ... You may want to truncate your string to the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: A question in an interview
    ... Parsing them out of the string, ... with nested loops incrementing along the string. ... Since one is using 'printing' as a criteria, start at the back a string ... >>Implement a function that prints all posible combinations of the characters ...
    (microsoft.public.vc.mfc)
  • RE: replacing " within a string
    ... In your code you are trying to replace few characters. ... string is immutable. ... Try this example and try to view the value of myString after printing SSS. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: shortening a string
    ... > When printing it out, I want it to be limited to 10 characters ... > I only want this to happen when the string is longer than 10 ... I know how to do it in Perl through reg ...
    (comp.lang.php)
  • Re: Prothon should not borrow Python strings!
    ... """It does not make sense to have a string without knowing what encoding ... same cul de sac as Python. ... Prothon_String_As_ASCII // raises error if there are high characters ... Python's split between byte strings and Unicode strings is ...
    (comp.lang.python)