Web Home
Getting Started
Manual
Packages
Quick Reference
Language Reference
Function Reference
I/O Reference

- Language Reference
  - Starting and Quitting Yorick
  - Getting Help
  - Error Recovery
  - Array Data Types
  - Constants
  - Defining Variables
  - Arithmetic and Comparison Operators
  - Logical Operators
  - Creating Arrays
  - Indexing Arrays
  - Array Conformability Rules
  - Calling Functions
  - Defining Functions
  - Variable Scope
  - Returning from Functions
  - Compound Statements
  - Conditional Execution
  - Loops
- Function Reference
- I/O Reference

# Yorick Language Reference

## Returning from Functions

`return` expr | return expr from current function The expr may be omitted to return nil, which is the default return value if no `return` statement is encountered.
`exit,` msg | return from all functions, printing msg
`error,`msg | halt with error, printing msg