1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Parametervariablen</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Genius-Handbuch"><link rel="up" href="ch06.html" title="Chapter 6. Programmierung mit GEL"><link rel="prev" href="ch06s05.html" title="Globale Variablen und Variablenbereiche"><link rel="next" href="ch06s07.html" title="Rückgabewerte"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Parametervariablen</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s05.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Programmierung mit GEL</th><td width="20%" align="right"> <a accesskey="n" href="ch06s07.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="genius-gel-parameters"></a>Parametervariablen</h2></div></div></div><p lang="en">
As we said before, there exist special variables called parameters
that exist in all scopes. To declare a parameter called
<code class="varname">foo</code> with the initial value 1, we write
</p><pre lang="en" class="programlisting">parameter foo = 1
</pre><p lang="en">
From then on, <code class="varname">foo</code> is a strictly global variable.
Setting <code class="varname">foo</code> inside any function will modify the
variable in all contexts, that is, functions do not have a private
copy of parameters.
</p><p lang="en">
When you undefine a parameter using the
<a class="link" href="ch11s02.html#gel-function-undefine">
<code class="function">undefine</code></a> function, it stops being
a parameter.
</p><p lang="en">
Some parameters are built-in and modify the behavior of genius.
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s05.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch06s07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Globale Variablen und Variablenbereiche </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Rückgabewerte</td></tr></table></div></body></html>
|