print

From the SETL Wiki

Jump to: navigation, search
print
Category I/O
Syntax function
Compatibility
CIMS SETL yes
SETL-S yes
SETL2 yes
GNU SETL yes

Contents

Purpose

Print to standard output

Synopsis

 print(arg [, ...]);

Description

Prints each argument to standard output, separated by spaces (except in SETL-S (See bugs) and SETL2), and terminated by a newline.
String arguments are written directly. Non-string arguments are first converted to strings (using str.)

Examples

  1. print("Hello, World");
    

    output: Hello, World

  2. print(1, 2);
    

    output: 1 2

Bugs

  • The documentation for SETL-S claims that the printed values are separated by spaces, but they are not.

Notes

  • In GNU SETL, equivalent to printa(stdout, arg [, ...])
  • In SETL2, the programmer can redefine the str function, in which case print will use the user-defined version in preference to the built-in version.
Personal tools