3
Print Keyword
Maxwell edited this page 2026-01-22 21:29:08 +11:00

Print

Keyword: print (or stdout)

Syntax: print $str

Time Complexity: O(n), where n is the amount of characters being printed.

Overview

The print keyword appends its argument to stdout.

Example usage

This program prints "Hello, world!" to the terminal

print "Hello, world!"

Println

Keyword: println (or stdlnout)

Syntax: println $str

Time Complexity: O(n), where n is the amount of characters being printed.

Overview

The println keyword appends its argument to stdout, then flushes the buffer.

Example usage

This program prints "Hello, world!" and flushes the terminal

println "Hello, world!"