File: scalarvariable.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (46 lines) | stat: -rw-r--r-- 1,716 bytes parent folder | download
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
44
45
46
<HTML>
<HEAD>
<TITLE>Scalar variables</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><A NAME="variablescalar"></A>
<font size="+2" color="green">Scalar variables</font></P>
<P>
 A scalar is a single valued double precision real numeric variable. A
 scalar can be used wherever a single numeric value is expected. 
 Indices have no meaning, and so are not allowed on scalars.</P>
<P>
 A literal scalar can be a single number, such as, <CODE>3.456</CODE>, or an
 expression that results in a single number, such as
 <code>LEN(x)+2</code>.</P>
<P>
 The following table shows the possible ways that variables can be
 considered to be equivalent to scalars, that is, can be used
 wherever scalars are expected.</P>
<p>
 <center><table border="1" cols="1">
 <tr>
 <td bgcolor="#FFCCCC">Let <code>a</code> and <code>b</code> be scalars<br />
 Suppose that <code>M</code> is a matrix, <code>V</code> is a vector, and <code>S</code>
  is a scalar</td>
 </tr><tr>
 <td><table cellpadding="1" cols="3">
   <tr>
   <td><code>S</code></td><td>=</td><td>the value of <code>S</code></td>
   </tr><tr>
   <td><code>V[a]</code></td><td>=</td><td>the value stored in the <code>a</code><sup><i>th</i></sup>
    element of <code>V</code></td>
   </tr><tr>
   <td><code>M[a,b]</code></td><td>=</td><td>the value stored in row <code>a</code> and
    column <code>b</code> of <code>M</code></td></tr>
   </table></td></tr></table>
 </center></p>
<P>
 <a href="variablename.htm"><img src="../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Variable names</font></a><br />
 <a href="vectorvariable.htm"><img src="../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">Vector variables</font></a>
</P>
</body>
</html>