Debian Codegraph @

help/pt_BR/html/ch06s09.html

raw
1 <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Lvalues</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Manual do Genius"><link rel="up" href="ch06.html" title="Chapter 6. Programming with GEL"><link rel="prev" href="ch06s08.html" title="References"><link rel="next" href="ch07.html" title="Chapter 7. Advanced Programming with GEL"></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">Lvalues</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s08.html">Prev</a> </td><th width="60%" align="center">Chapter 6. Programming with GEL</th><td width="20%" align="right"> <a accesskey="n" href="ch07.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-lvalues"></a>Lvalues</h2></div></div></div><p lang="en">
2 An lvalue is the left hand side of an assignment. In other words, an
3 lvalue is what you assign something to. Valid lvalues are:
4 </p><div class="variablelist"><dl class="variablelist"><dt><span lang="en" class="term"><strong class="userinput"><code>a</code></strong></span></dt><dd><p lang="en">
5 Identifier. Here we would be setting the variable of name
6 <code class="varname">a</code>.
7 </p></dd><dt><span lang="en" class="term"><strong class="userinput"><code>*a</code></strong></span></dt><dd><p lang="en">
8 Dereference of an identifier. This will set whatever variable
9 <code class="varname">a</code> points to.
10 </p></dd><dt><span lang="en" class="term"><strong class="userinput"><code>a@(&lt;region&gt;)</code></strong></span></dt><dd><p lang="en">
11 A region of a matrix. Here the region is specified normally as with
12 the regular @() operator, and can be a single entry, or an entire
13 region of the matrix.
14 </p></dd></dl></div><p lang="en">
15 </p><p lang="en">
16 Examples:
17 </p><pre lang="en" class="programlisting">a:=4
18 *tmp := 89
19 a@(1,1) := 5
20 a@(4:8,3) := [1,2,3,4,5]'
21 </pre><p lang="en">
22 Note that both <code class="literal">:=</code> and <code class="literal">=</code> can be used
23 interchangeably. Except if the assignment appears in a condition.
24 It is thus always safer to just use
25 <code class="literal">:=</code> when you mean assignment, and <code class="literal">==</code>
26 when you mean comparison.
27 </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s08.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="ch07.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">References </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 7. Advanced Programming with GEL</td></tr></table></div></body></html>