Operators


JScript includes a number of different operators that you can use to perform calculations, make comparisons, make assignments, and more. This section presents the most commonly used JScript operators, organized by type: Table B-1 lists the mathematical operators; Table B-2 lists the comparison operators; and Table B-3 lists the assignment operators.

Table B-1: Mathematical Operators

Operator

Description

Example Usage

*

Multiplication

OrderTotal * 1.1;

/

Division

TotalItems / 2;

%

Modulus arithmetic

Quantity % 2;

+

Addition

OrderTotal + TaxTotal;

Subtraction

OrderTotal – Discount;

++

Increment

++k // to increment a counter

--

Decrement

--k // to decrement a counter

Table B-2: Comparison Operators

Operator

Description

<

Less than

>

Greater than

<=

Less than or equal to

>=

Greater than or equal to

==

Equality

!=

Inequality

Table B-3: Assignment Operators

Operator

Description

Example Usage

=

Assignment

SalesTaxRate = .06;




How to Do Everything with Microsoft Office InfoPath 2003
How to Do Everything with Microsoft Office InfoPath 2003 (How to Do Everything)
ISBN: 0072231270
EAN: 2147483647
Year: 2006
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net