<<

Contents

Search

>>

 

LPRINT

 

 

Instruction

 

 

Syntax:

LPRINT [USING <STRING-EXPRESSION>;] <List of expressions>[;]

 

Meaning:

Prints the text at the current cursor position on the print document.

 

The <List of expressions>, which must be separated by commas and semi-colons, are printed.

 

The expression is formatted as shown below:

 

Line feed: If the instruction LPRINT ends with ";" or ",", the next LPRINT instruction is printed in the same print line, otherwise a line feed is carried out.

 

Tabs: If values are printed without USING, those values of expressions that are separated by semi-colons are printed one after the other without linefeed. With commas tabs are inserted.

 

Alphanumeric expressions, which are separated by semi-colons, are printed one after the other without print position in between. With numeric expression a blank is printed after the value; with positive values a leading blank is inserted, with negative values a leading minus sign is inserted. The numeric values are printed in the form STR$(<NUM-EXPRESSION>).

 

USING <STRING-EXPRESSION>: The format of printed similar expressions can be specified with a USING character string. Commas in the <List of expressions> then do not lead to a tab.

 

The following format symbols are available for character strings:

 

!

Only the first character of the string is printed.

 

LPRINT USING "!";"only one ","Character"

prints: oC

 

\n Blanks\

The output field consists of n+2 print positions. If the character string does not have so many characters, the line is filled with blanks on the right. If the string has more characters, the surplus characters on the right are cut off.

 

LPRINT USING "\ \";"Only"," 3","Characters"

prints: Onl 3 Cha

 

&

The output field has the length of the character string to be printed.

 

LPRINT USING "&";"Only"," 3","Characters"

prints: Only 3Characters

 

The following format symbols are available for numeric values:

 

#[.]

A string of numbers specifies a numeric output field in the defined length. A point in the character string specifies the position of the decimal point. Zeroes are added if necessary. If pre-decimal positions are to be printed and if the numeric expression is smaller than 1, a leading zero is inserted. With negative numbers a minus sign is inserted.

 

LPRINT USING "###";123,12,1

prints: 123 12  1

 

LPRINT USING "##.##";12.3,1.29,0.1,1.256

prints: 12.30 1.29 0.10 1.25

 

LPRINT USING "##.##";-2.3,-0.123

prints: -2.30-0.12

 

,

A comma before the point in a numeric output field means that a comma is printed as separator for thousands digits. The comma itself is not a placeholder for a number. There must be print positions available for commas in the output field. 

 

LPRINT USING "#####,.##", 124.56

prints: 1,234.56

 

**

2 asterices at the beginning of the formatting string have the effect that leading print positions of a numeric field are filled with asterices. The two asterices specify two print positions of the output field.

 

LPRINT USING "**#.##";123.45,1.23,10,-2.3

prints: 123.45**1.23*10.00*-2.30

 

$$

A dollar sign is printed before the printed value. The two dollar signs specify two print positions of the output field.

 

LPRINT USING "$$##.##";123.45,1.23,10

prints: $123.45 $1.23 $10.00

 

**$

The format symbols ** and $$ are combined. The leading print positions in a numeric field are filled with asterices. A dollar sign is printed before the value. **$ specify 3 print positions of the output field.

 

LPRINT USING "**$#.##";123.45,1.23,10

prints: $123.45**$1.23*$10.00

 

_

The character after the underscore is printed and is not interpreted as placeholder for the formatting.

 

LPRINT USING "_####.##";12.45

prints: # 12.45

 

Character string

The character string is printed as such.

 

LPRINT USING "Value= ###.##";123.45

prints: Value= 123.45

 

LPRINT USING "Value= ###.## €";123.45,10

prints: Value= 123.45 € Value=  10.00 €

 

If a number does not fit into the output field, percent signs % are printed instead of the numbers.

 

LPRINT USING "Value= ###.##";1234.56

prints: Value= %%%.56

 

See also:

TAB

PRINT

LPRINT_CENTERED

LPRINT_JUSTIFIED

PRINTER

REPORT

EBUS_PRINT_ON_SERVER