PDF-Version - am Institut für Baustatik
PDF-Version - am Institut für Baustatik
PDF-Version - am Institut für Baustatik
Erfolgreiche ePaper selbst erstellen
Machen Sie aus Ihren PDF Publikationen ein blätterbares Flipbook mit unserer einzigartigen Google optimierten e-Paper Software.
statement, while the colon tells it not to print the result. The terminator does not need to be typed on<br />
the s<strong>am</strong>e line as the rest of the statement, so if you forget it on one line you can type it on the next<br />
line. For ex<strong>am</strong>ple:<br />
> 4+5:<br />
is a statement to add 4 and 5 but not to print the result. An equivalent statement is:<br />
> 4+5<br />
> :<br />
In this case, after the first line Maple will assume that you have not finished your statement. On seeing<br />
the colon on the next line, Maple will realize the statement is finished and evaluate 4+5. If you are<br />
using X Windows, it will give you the statement "Warning, premature end of input". You can avoid this<br />
by typing Shift-Return instead of Return.<br />
You can put more than one statement on a line, just as you can break a statement across multiple<br />
lines. The requirement is that statements be terminated, not that they fit on a line.<br />
There are two Maple statements that do not have to be terminated in this way: quit and the ? form of<br />
the help request:<br />
> quit<br />
> ?help<br />
[a help window appears]<br />
Maple has a number of pre-defined global variables. When you choose n<strong>am</strong>es for your own variables,<br />
you should avoid the predefined ones. They are there to help you control how Maple works. This is<br />
discussed further in the section.<br />
11.2.2 Comments and Echoing (Kommentar und Echo)<br />
Any line or portion of a line beginning with a # is treated as a comment. Comments are ignored in<br />
processing. For ex<strong>am</strong>ple:<br />
> 4+5;#This is an ex<strong>am</strong>ple of a comment<br />
gives the output:<br />
9<br />
Since a comment is not a statement, it does not need to be terminated. It only causes the remaining<br />
input on the line to be ignored.<br />
It is possible to control how much information is echoed in Maple. The echo level can be set with the<br />
interface function. An echo level of four causes comments and statements to be echoed. For more<br />
information on how to control various user-interface settings, type:<br />
> ?interface<br />
11.2.3 Simple Arithmetic (einfache Arithmetik)<br />
As you may have determined from some of the ex<strong>am</strong>ples above, you can use Maple to evaluate<br />
arithmetic expressions in the intuitively obvious way:<br />
0+ for addition<br />
1- for subtraction<br />
2* for multiplication<br />
3/ for division<br />
Arithmetic expressions are evaluated according to typical precedence rules (Rechenregeln, "Punkt vor<br />
Strich"), so:<br />
> 4+2*3;<br />
10<br />
because 2*3 is evaluated before the addition. Other useful operators are:<br />
104