3

Statements

In the previous chapter, we learnt about the data types, expressions and operators supported by numEclipse. In this chapter, we will focus on statements including assignment statement, loops and conditional statements.

3.1 Assignment Statement

The assignment statement is the most simple statement in a programming language. In numEclipse an assignment could take different forms depending on the type of variables involved. In its simple form, it looks like the following expression.

< var_name > = < expression >

“=” is the assignment operator. This statement evaluates the expression and assigns the resulting value to the variable named on the left hand side. The left hand side or lvalue must be a valid identifier name. Identifier ...

Get Practical Scientific Computing now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.