Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sequencer-2-2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
epics-modules
sequencer-2-2
Commits
47988fc6
Commit
47988fc6
authored
10 years ago
by
Ben Franksen
Browse files
Options
Downloads
Patches
Plain Diff
docs: clarified semantics of function definitions
parent
b602ac80
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
documentation/Reference.txt
+15
-9
15 additions, 9 deletions
documentation/Reference.txt
with
15 additions
and
9 deletions
documentation/Reference.txt
+
15
−
9
View file @
47988fc6
...
@@ -223,15 +223,21 @@ Function Definitions
...
@@ -223,15 +223,21 @@ Function Definitions
Function definitions are very much like those in C.
Function definitions are very much like those in C.
The most important difference is that functions declared in SNL get
The most important difference is that functions declared in SNL get passed
passed certain implicit parameters. This makes it possible to call
certain implicit parameters. This makes it possible to call built-in
built-in functions as if the code were a normal action block.
functions as if the code were a normal action block. Note, however, that
there is currently no way to *pass* channel ("assigned") variables to SNL
Another difference from C is that SNL functions automatically scope over
functions in such a way that you can call built-in functions on them. The
the whole program, no matter where they are declared. It is neither
"assigned" status of such a variable is lost and it gets passes to the
necessary, nor is it allowed, to repeat the function declaration
function as a normal C value. This means you can call built-in functions
(without the defining code block, commonly referred to as a "function
that expect such a variable only if the variable was declared at the
prototype") at the top of the program.
top-level. Lifting this limitation is planned for a future release.
Another difference from C is that SNL functions automatically scope over the
whole program, no matter where they are defined. It is not necessary (but
allowed) to repeat the function declaration (without the defining code
block, commonly referred to as a "function prototype") at the top of the
program.
Type Definitions
Type Definitions
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment