84 lines
5.1 KiB
HTML
84 lines
5.1 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="Priority of operators when evaluating expressions" />
|
|
<meta name="abstract" content="When multiple operators occur in an expression, the expression is evaluated in a specific order depending upon the operators in the expression." />
|
|
<meta name="description" content="When multiple operators occur in an expression, the expression is evaluated in a specific order depending upon the operators in the expression." />
|
|
<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="rbam6operpriority" />
|
|
<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>Priority of operators when evaluating expressions</title>
|
|
</head>
|
|
<body id="rbam6operpriority"><a name="rbam6operpriority"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Priority of operators when evaluating expressions</h1>
|
|
<div><p>When multiple operators occur in an expression, the expression
|
|
is evaluated in a specific order depending upon the operators in the expression. </p>
|
|
<div class="section"><p>Parentheses can be used to change the order of expression evaluation.
|
|
The following table shows the priority of all the operators used in expressions,
|
|
including signed decimal values.</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption>Table 1. Priority of operators</caption><thead align="left"><tr><th valign="top" width="14.572864321608039%" id="d0e23">Priority</th>
|
|
<th valign="top" width="85.42713567839196%" id="d0e25">Operators</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">1</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">signed (+ and -) decimal values, *NOT, ¬</td>
|
|
</tr>
|
|
<tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">2</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">* , /</td>
|
|
</tr>
|
|
<tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">3</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">+, - (when used between two operands)</td>
|
|
</tr>
|
|
<tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">4</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">*CAT, ||, *BCAT, |>, *TCAT, |<</td>
|
|
</tr>
|
|
<tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">5</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">*GT, *LT, *EQ, *GE, *LE, *NE, *NG, *NL, >, <, =, >=, <=,
|
|
¬=, ¬>, ¬<</td>
|
|
</tr>
|
|
<tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">6</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">*AND, &</td>
|
|
</tr>
|
|
<tr><td valign="top" width="14.572864321608039%" headers="d0e23 ">7</td>
|
|
<td valign="top" width="85.42713567839196%" headers="d0e25 ">*OR, |</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p>A priority of 1 is the highest priority (signed values are evaluated
|
|
first); a priority of 7 is the lowest priority (OR relationships are evaluated
|
|
last). When operators with different priority levels appear in an expression,
|
|
operations are performed according to priorities.</p>
|
|
<p>When operators of
|
|
the <em>same</em> priority appear in an expression, operations are performed
|
|
from left to right within the expression. Parentheses can always be used to
|
|
control the order in which operations are performed. The value of a parenthetical
|
|
expression is determined from the innermost level to the outermost level,
|
|
following the priorities stated above within matching sets of parentheses.</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> |