File: 21_Syntax_errors.schelp

package info (click to toggle)
supercollider 1%3A3.13.0%2Brepack-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 80,296 kB
  • sloc: cpp: 476,363; lisp: 84,680; ansic: 77,685; sh: 25,509; python: 7,909; makefile: 3,440; perl: 1,964; javascript: 974; xml: 826; java: 677; yacc: 314; lex: 175; objc: 152; ruby: 136
file content (43 lines) | stat: -rw-r--r-- 1,696 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
title:: 21_Syntax_errors
summary:: Mark Polishook tutorial
categories:: Tutorials>Mark_Polishook_tutorial
related:: Tutorials/Mark_Polishook_tutorial/00_Introductory_tutorial

section::Syntax and grammar

Before it actually runs a program, SuperCollider examines the code to ensure that syntax and grammar are correct. For example, are all variable names and/or keywords spelled correctly in a program? Are statements terminated by semi-colons?

If syntax or grammar errors are found, SuperCollider writes a notification to the post window. Such messages are descriptive but terse.

code::
* ERROR: Parse error
   in file 'selected text'
   line 1 char 2 :
  4,
-----------------------------------
* ERROR: Command line parse failed
nil
::

section::Common errors

numberedList::
## the name of a class or a variable is misspelled
## a variable is used before being declared
## a parenthesis or a square or curly brace is missing or used in the wrong context
## a required comma or semicolon is missing or used improperly
::

////////////////////////////////////////////////////////////////////////////////////////////////////

Two helpful commands in the SuperCollider Edit menu:

numberedList::
## "Go to Line ..." transports you to the line number of your choice. Use this when an error message identifies the line number on which a problem occurred.

## "Find" searches for words or phrases. Use "Find" to locate code that has been identified in error messages or to replace all instances of an improperly spelled word.
::

////////////////////////////////////////////////////////////////////////////////////////////////////

go to link::Tutorials/Mark_Polishook_tutorial/22_Runtime_errors::