# print statement

The print statement directs output of
an expression to the current output device.

## Syntax

```
print {exp{,}{:}}{exp{,}{:}...}
```

## Parameter(s)

| exp | Expression whose output is sent to the printer. Multiple expressions can be specified. |
| --- | --- |
| , | Defines 18-character tab stops at which comma-separated expressions are output left-aligned. Note: Use of @() cursor positioning in conjunction with this feature produces undesirable results. |
| : | Inhibits the output of a return and scroll following output of the last printed line. |

## Description

If nothing follows the print statement, a blank line is output.

The print
list, if present, consists of any number of expressions, including @() functions, separated by commas or colons.

## Example(s)

This statement outputs the literal
string `hello`. The quotation marks delimit the literal
string and are not printed.

```
print ’hello’
```
This statement outputs the contents of the variable message
to the current active output device.

```
message = ’hello’
print message
```
This statement outputs the results of a string expression
made up of the variables message and `company.name` and the literal string space (`" "`).

```
print message:’ ’:company.name
```
This statement positions the cursor at column 10, row
10 of the terminal display, displays the literal string the amount
is, and outputs the result of the arithmetic expression `unit.price * qty` right-aligned in a field of 12 characters.

```
print @(10,10):’the amount is ’ : (unit.price * qty) ’r#12’
```

## See also

- [, reserved character](https://d3codex.com/pickbasic-flashbasic/comma-reserved-character/)
- [: relational operator](https://d3codex.com/pickbasic-flashbasic/colon-relational-operator/)
- [@() function](https://d3codex.com/pickbasic-flashbasic/at-parenthesis-function/)
- [cat relational operator](https://d3codex.com/pickbasic-flashbasic/cat-relational-operator/)
- [char() function](https://d3codex.com/pickbasic-flashbasic/char-function/)
- [crt statement](https://d3codex.com/pickbasic-flashbasic/crt-statement/)
- [Masking](https://d3codex.com/pickbasic-flashbasic/masking/)
- [print on statement](https://d3codex.com/pickbasic-flashbasic/print-on-statement/)
- [printer statement](https://d3codex.com/pickbasic-flashbasic/printer-statement/)
- [Statements and functions](https://d3codex.com/pickbasic-flashbasic/statements-and-functions/)

---
Source: https://d3codex.com/pickbasic-flashbasic/print-statement/ - part of the D3Codex reference.
