print *
Writes value(s) to the screen.
Syntax
print *, value
Description
print *, is the simplest output method. * means free format; it adds an alignment space at the beginning. Multiple values are written separated by commas.
Example
Loading editor…
Expected output
Hello 42
When to use?
Quick output, debugging.
Common mistakes
- ⚠️ print * puts a space at the beginning of the output; use write for aligned/clean output.