File: assignments.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 (37 lines) | stat: -rw-r--r-- 1,299 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
<HTML>
<HEAD>
<TITLE>Assignments</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P><A NAME="assignments"></A>
<font size=+3 color="green"><B>Assignments</B></font></P>
<P>
 An assignment stores the value(s) of an expression into a
 <font size="-1" face="Arial black" color="red">EXTREMA</font> variable.  An
 assignment has the form:
 <CODE>variable = expression</CODE>
 where <code>expression</code> is some combination of
 constants, variables, functions, and operators.  For example:</P>
 <font color="blue"><PRE>
 Y=A*COSD(X/10)+3.5*SIND(X/12)+C*EXP(-X)
 </PRE></font>
<P>
 The type of variable generated by an assignment is determined by the
 expression. Input is limited to <code>255</code> characters, so to have
 expressions that are longer, use character variables to store its pieces.
 For example:</P>
 <font color="blue"><PRE>
 F1 = '2.5*COS(X/10)+3.5*SIN(X/12)+63.7*EXP(X/45)'
 F2 = '1.234567*MOD(X,100)+SIN(X/1000)*EXP(X/200)'
 F3 = '3.56789*X^2-2.34567*X+23.456'
 Y = F1+F2+F3
 </PRE></font>
<P>
 <a href="expression.htm"><img src="../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Expressions</font></a><br />
 <a href="characterassignment.htm"><img src="../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">String assignments</font></a>
</P>
</BODY>
</HTML>