UNIX TIPs OF THE DAY:
Spend some time NOW getting familiar with the editor of your choice
(e.g., xemacs). Run through the entire xemacs tutorial -- you
will get some instructions for doing this in lab on Monday. Taking
time now will save LOTS of time in the long run.
If you change your shell to tsch, then you can save on typing.
When typing a file-name on the command line, hit the TAB key. If
you have typed enough of the file-name to make it unique, unix will
complete the name for you. If you have not, it will complete as
much as it can be sure of, and beep at you for more input.
-----------------------------
ASSIGNMENT:
Reading: D&D, Chapt. 2 - 2.10: pp. 70-98.
Exercises: pp. 66-67: #1.19, 1.22, 1.26 (on machine)
-----------------------------
TODAY'S TOPICS
Another C++ program -- input two numbers and printer their sum: fig1.6.cc
Compiling (preprocessing, compiling, linking) and executing the
program on our system:
Use the two Unix commands
CC fig1.6.cc
a.out
== equal
!= not equal
< less than
<= less than or equal (note that the symbols are written in the
same
order as they are normally read)
> greater than
>= greater than or equal
The precedence of the relational operators are all less than all
the arithmetic operators.
For example,
x + y + z <= x * y * z is the same as (x + y + z) <= (x * y *
z)
x = y = 3;
which means
x = (y = 3);
To understand this we need to understand first that the value of the
expression y = 3 is 3. Thus we first assign the variable y the value
3 and then assign x the value of the expression (y = 3).