63 lines
3.7 KiB
HTML
63 lines
3.7 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="reference" />
|
|
<meta name="DC.Title" content="Arithmetic expressions" />
|
|
<meta name="abstract" content="The operands in an arithmetic expression must be decimal constants or decimal or integer CL variables." />
|
|
<meta name="description" content="The operands in an arithmetic expression must be decimal constants or decimal or integer CL variables." />
|
|
<meta name="DC.Relation" scheme="URI" content="rbam6xpressincom.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbam6arithexp" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Arithmetic expressions</title>
|
|
</head>
|
|
<body id="rbam6arithexp"><a name="rbam6arithexp"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Arithmetic expressions</h1>
|
|
<div><p>The operands in an arithmetic expression must be decimal constants
|
|
or decimal or integer CL variables. </p>
|
|
<div class="section"><p>An arithmetic operator (only in symbolic form) must be between
|
|
the operands. The results of all arithmetic expressions are decimal values,
|
|
which may be stored in a CL variable.</p>
|
|
<div class="note"><span class="notetitle">Note:</span> The division operator (/) must
|
|
be preceded by a blank if the operand that precedes it is a variable name.
|
|
(For example, <samp class="codeph">&A /2</samp>, <em>not</em> <samp class="codeph">&A/2</samp>.)
|
|
All other arithmetic operators may optionally be preceded or followed by a
|
|
blank.</div>
|
|
<p>Arithmetic operands can be signed or unsigned;
|
|
that is, each operand (whether it is a numeric constant or a decimal or integer
|
|
CL variable) can be immediately preceded by a plus (+) or minus (-) sign,
|
|
but a sign is not required. When used as a sign, no blanks can occur between
|
|
the + or - and its value. For example, a decimal constant of 23.7 can be expressed
|
|
as +23.7 or -23.7 (signed) or as 23.7 (unsigned).</p>
|
|
<p>The following are
|
|
examples of arithmetic expressions:</p>
|
|
<pre>(&A + 1) (&A + &B -15)
|
|
(&A - &F) (&A+&B-15)
|
|
(&A + (-&B))</pre>
|
|
<p>If the last non-blank character on a line
|
|
is a + or -, it is treated as a continuation character and not as an arithmetic
|
|
operator.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbam6xpressincom.htm" title="A character string expression can be used for any parameter, element, or qualifier defined with EXPR(*YES) in the command definition object.">Expressions in CL commands</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |