C and pointer Reading Notes Chapter 2-operators and expressions, c and pointer Reading Notes

Source: Internet
Author: User

C and pointer Reading Notes Chapter 2-operators and expressions, c and pointer Reading Notes

For Original Articles, please indicate the source:Http://www.cnblogs.com/DayByDay/p/3936503.html


An expression contains variables, constants, operators, and parentheses. Parentheses can be nested. You can write a program to determine whether the parentheses in the expression match correctly.

Expression Technology
In 3ds max, you can use mathematical expressions (rather than constants) to express parameter values. For example, you can use the expression 24*6 to represent the number 144.

Mathematical Expressions can be used to control attributes of the following objects:

Object parameters, such as length, width, and height

Transform and modifier values, such as the object's Coordinate Position

The associated parameters, expression controllers, and numeric expression calculators all use the expressions described in this topic.

An expression is a mathematical function that can produce numbers. Expressions can be used to control the following scenario elements:

Scenario element Computability attributes
Create parameters any number to create parameters
Change location [X, Y, Z]
X axis rotation

Y axis rotation

Z axis rotation

Scale [X %, Y %, Z %]

Modifier any number modifier parameters (including creation parameters)
Material color [R, G, B]
Any Numeric Material Parameter

Note: The expression only processes a single XYZ component of Euler's rotation. Expressions cannot be specified to TCB rotation or other types of rotation controllers.

Note: The following links point to the chapters contained in this topic.

Expression result type

Operator

Variable

Function

See
Trigonometric function

Vector

Expression Controller Technology

Expression result type
The type of the value obtained by the expression depends on the type of the controller:

A floating-point expression is used to obtain the floating-point scalar value (for example, 5.617 ). Scalar is used in the animation controller of numeric parameters.

If the parameter has an integer, the expression rounds the floating point value to the nearest integer.

Positions, scales, and Point3 expressions are used to obtain the ternary vector. For example, [5, 18, 24]. The vector can represent the X, Y, Z position of the object, X, Y, Z percentage scaling, or the color (RGB value) in the material ).

Operator
In the following table, p and q represent any scalar value or expression, and V and W represent any vector value or expression. (The character "x" is used as the vector Cross Product Operator .)

Scalar operator
The following are arithmetic operators used for scalar values:

Operator meaning
+ P + q others
-P-q Subtraction
--P addition: reverse Element
* P * q Multiplication
/P/q Department
^ P ^ q power (q power of p)
The ** p ** q ^ and ** operations are the same.

You can also use the logical (Boolean) Operator for scalar values. If it is true, all these operators get 1; otherwise, 0 is obtained:

Operator meaning
= P = q =
<P <q less
> P> q is greater
<= P <= q is less than or equal
> = P> = q is greater than or equal
| P | q logic or, if p or q is not zero, 1 is obtained; otherwise, 0 is obtained.
& P & q logical sum. If neither p nor q is zero, 1 is obtained; otherwise, 0 is obtained.

Tip: logical operators are useful in the "condition" function.

Vector Operators
For vectors with variable names, you can use the special component operator (.) to refer to the three scalar components of a vector:

Usage description
V. x first component (X)
V. y second component (Y)
V. z third component (Z)

The following operators are used for vector arithmetic:

Operator meaning
+ V + W Others
-V-W Subtraction
* P * V Scalar Multiplication
* V * p Scalar Multiplication
* V * W dot product
X VxW Cross Product
/V/p scalar Division

Operator priority
The expression has eight priority levels. Operators with a higher position in the list are evaluated first.

Operator priority
-+ As a unary operator, such as-8, + 25
. Component operators, such as V. x
** ^
X Cross Product
*/
+-
= <> <=> =
| &

Parentheses are special cases... the remaining full text>

Syntax error (operator loss) in the query expression 'Id in!

Write the program again. Do not check the original one or test it:
Response. write ("delete from article WHERE id in (" + Replace (Command1 _ cc, "'", "'' ") + ")")
Response. end ()
To see what the output statement is. If it is not empty, the machine is joking with you.
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.