The Mud Puddle

Home of Jon "evincarofautumn" Purdy

sol : space

Name

sol : space - A description of how the sol interpreter treats whitespace characters across systems.

Synopsis

\f  Form feed
\l  Line feed
\n  Newline
\r  Carriage return
\s  Space
\t  Tab
\v  Vertical tab

Newlines

There is no single system-spanning newline character. The newline is an illusion created by the sol interpreter that allows scripts to run the same--or at least similarly--across different implementations. The default newline character is represented by \n in quoted constants, but the actual character value varies between \l, a line feed (ASCII 10), \r, a carriage return (ASCII 13), \r\l, a CRLF (ASCII 13, 10), or something international defined by std/intl. On Windows systems, the default newline is usually \r\l and sometimes \l but rarely just \r; on Unix and cousins, it's almost always just \l.

Whitespace

The following characters are treated as whitespace and are ignored by the interpreter:

  • Form feeds (ASCII 12)
  • Line feeds (ASCII 10)
  • Carriage returns (ASCII 13)
  • Spaces (ASCII 32)
  • Horizontal tabs (ASCII 9)
  • Vertical tabs (ASCII 11)
  • Other characters with an ASCII value less than 32 (control chars) or greater than 127 (high-order ASCII chars)

Whitespace and whitespace-like characters tend to break tokens unless overridden by being wrapped in a quoted constant, in which case they are created as they appear in the source file.

See Also

sol ~ Sol sol/op ~ Operator reference

Author

Jon "evincarofautumn" Purdy evincarofautumn(at)gmail(dot)com