﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.97.5189.3332"?>
<regions>
  <settings>
    <identity>
      <id>be8ed228-7b9f-4d88-9521-f6039e697cd5</id>
      <revision>38</revision>
    </identity>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="9" orientation="Portrait" width="827" height="1169" />
      <margins left="39" right="39" top="39" bottom="39" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependences>
      <assembly name="SMath Studio Desktop" version="0.97.5189.3332" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Text Region" version="1.10.5197.29249" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
      <assembly name="Special Functions" version="1.11.5189.3346" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="MaximaPlugin" version="1.97.5154.37155" guid="44011c1e-5d0d-4533-8e68-e32b5badce41" />
      <assembly name="Math Region" version="0.97.5189.3332" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="Custom Functions" version="1.0.5177.39372" guid="18dadffd-79a3-4cf9-aee1-d66deb0ea720" />
      <assembly name="Picture Region" version="1.10.5189.3339" guid="06b5df04-393e-4be7-9107-305196fcb861" />
    </dependences>
  </settings>
  <region id="0" left="18" top="18" width="192" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p bold="true">Funktionen als Argumente</p>
    </text>
    <text lang="eng">
      <p bold="true">Functions as arguments</p>
    </text>
  </region>
  <region id="1" left="513" top="18" width="103" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p href="Kapitel Programmierung.sm">Programmierung</p>
    </text>
    <text lang="eng">
      <p href="Kapitel Programmierung.sm">Programming</p>
    </text>
  </region>
  <region id="2" left="513" top="36" width="78" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p href="contents.sm">Inhalt</p>
    </text>
    <text lang="eng">
      <p href="contents.sm">Contents</p>
    </text>
  </region>
  <region id="3" left="18" top="72" width="634" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Mitunter möchte man Funktionen als Argumente an andere Funktionen übergeben.</p>
    </text>
    <text lang="eng">
      <p>Sometimes you want to provide functions as arguments to other functions</p>
    </text>
  </region>
  <region id="4" left="18" top="108" width="691" height="88" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Es gibt zwei Wege, dies zu tun:- Funktion mit Funktionen als Formalparameter definieren. Der Aktualparameter muss     dann eine Funktion sein. Das ist der offiziell empfohlene Weg.- Eingebettete Definitionen im Funktionsaufruf. Das funktioniert, stützt sich aber     auf Nebenwirkungen und hat selbst Nebenwirkungen.</p>
    </text>
    <text lang="eng">
      <p>There are two options to hand over functions to other functions: - specify function arguments in the definition and provide arguments that evaluate     to functions in the function call. This is the officially recommended way. - specify inline definitions in the function call. This works, but just uses      side effects and has it's own side effects</p>
    </text>
  </region>
  <region id="5" left="18" top="216" width="324" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p bold="true" underline="true">Der offizielle Weg: Funktionsargumente</p>
    </text>
    <text lang="eng">
      <p bold="true" underline="true">The official way: function arguments</p>
    </text>
  </region>
  <region id="6" left="18" top="252" width="94" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p underline="true">Definition</p>
    </text>
  </region>
  <region id="7" left="18" top="279" width="700" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>In der Definition kennzeichnet man ein Funktionsargument durch einen Namen mit nachgestellter Zahl der Argumente in Klammern.</p>
    </text>
    <text lang="eng">
      <p>In the function definition, the number of expected arguments of an argument functionis specified as a number in parens after the function name</p>
    </text>
  </region>
  <region id="8" left="36" top="324" width="188" height="66" color="#000000" bgColor="#ffffff" fontSize="10">
    <math optimize="0">
      <input>
        <e type="operand">1</e>
        <e type="function" args="1">g</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="3">f</e>
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
        <e type="operand">x</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" preserve="true" args="4">int</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="9" left="243" top="342" width="458" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Die 1 als Argument von g() kennzeichnet, dass f() hier eineFunktion mit einem Argument erwartet.</p>
    </text>
    <text lang="eng">
      <p>Number 1 as argument of g() specifies that f() expects a function with one argument.</p>
    </text>
  </region>
  <region id="10" left="18" top="396" width="374" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p underline="true">Richtiger Aufruf: Funktionswertiger Ausdruck</p>
    </text>
    <text lang="eng">
      <p underline="true">Correct call: expression evaluates to a function</p>
    </text>
  </region>
  <region id="11" left="18" top="432" width="717" height="56" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Der als Aktualparameter für Funktionsargumente übergebene Ausdruck muss eine Funktion mit der richtigen Zahl von Argumenten ergeben. Deren Namen sind belanglos, müssen aberundefiniert sein, sonst ergibt der Ausdruck einen Zahlenwert und keine Funktion. </p>
    </text>
    <text lang="eng">
      <p>When calling a function with function arguments, then the actual values must be functions with the expected number of arguments. These can have arbitrary names but must be undefined, otherwise the expression evaluates to a number and not to a function.</p>
    </text>
  </region>
  <region id="12" left="36" top="504" width="127" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">sin</e>
      </input>
      <result action="symbolic">
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">sin</e>
      </result>
    </math>
  </region>
  <region id="13" left="36" top="531" width="158" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">sin</e>
        <e type="operand">0</e>
        <e type="operand">π</e>
        <e type="function" args="3">f</e>
      </input>
      <result action="numeric">
        <e type="operand">2</e>
      </result>
    </math>
  </region>
  <region id="14" left="243" top="531" width="474" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>sin(x) wird nur dann zu sin(x) ausgewertet, wenn x nicht definiert ist.</p>
    </text>
    <text lang="eng">
      <p>sin(x) evaluates to sin(x) only if x is undefined.</p>
    </text>
  </region>
  <region id="15" left="18" top="576" width="464" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p underline="true">Falscher Aufruf: das Funktionsargument ergibt eine Zahl</p>
    </text>
    <text lang="eng">
      <p underline="true">Incorrect call, expression evaluates to a number</p>
    </text>
  </region>
  <region id="16" left="36" top="603" width="43" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="operand">2</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="17" left="36" top="630" width="131" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">sin</e>
      </input>
      <result action="numeric">
        <e type="operand">0.9093</e>
      </result>
    </math>
  </region>
  <region id="18" left="243" top="648" width="450" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Hier ergibt das erste Argument keine Funktion, weil x bereits einen Wert hat.</p>
    </text>
    <text lang="eng">
      <p>Here, the first argument does not evaluate to a functionbecause the dummy argument has a value.</p>
    </text>
  </region>
  <region id="19" left="36" top="657" width="158" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math error="55">
      <input>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">sin</e>
        <e type="operand">0</e>
        <e type="operand">π</e>
        <e type="function" args="3">f</e>
      </input>
      <result action="none">
        <e type="operand">#</e>
      </result>
    </math>
  </region>
  <region id="20" left="36" top="693" width="106" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">Clear</e>
      </input>
      <result action="numeric">
        <e type="operand">1</e>
      </result>
    </math>
  </region>
  <region id="21" left="243" top="693" width="462" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Hier löschen wir x, damit es für Beispiele weiter untenwieder undefiniert ist.</p>
    </text>
    <text lang="eng">
      <p>Here, we clear x, to have it undefined for examples further downstream.</p>
    </text>
  </region>
  <region id="22" left="18" top="747" width="399" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p bold="true" underline="true">Der inoffizielle Weg: Eingebettete Definitionen</p>
    </text>
    <text lang="eng">
      <p bold="true" underline="true">The unofficial way: Inline definitions</p>
    </text>
  </region>
  <region id="23" left="18" top="783" width="693" height="72" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Eingebettete Definitionen sind Zuweisungen mit dem Operator := innerhalb derArgumentliste. Diese nimmt beliebige Ausdrücke auf, darunter eben auch Zuweisungen.Diese sind dann innerhalb der Funktion bekannt, als wären sie Teil der Funktionsdefinition selbst.  </p>
    </text>
    <text lang="eng">
      <p>Inline definitions are assignments inside the argument list of the function call.You can place any expressions in the argument list, among them expressions. Such definitions are known to the function body as if they were part of it. </p>
    </text>
  </region>
  <region id="24" left="18" top="855" width="645" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Deshalb muss beim Aufruf der gleiche Funktionsname verwendet werden wie inder Definition der Funktion. Das ist beim offiziellen Weg nicht erforderlich.</p>
    </text>
    <text lang="eng">
      <p>This means that in the function call you must use the same name as is used insidethe function (in the official way this is not required)</p>
    </text>
  </region>
  <region id="25" left="18" top="900" width="94" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="eng">
      <p underline="true">Definition</p>
    </text>
  </region>
  <region id="26" left="27" top="936" width="193" height="66" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">expr</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" args="3">f</e>
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
        <e type="operand">x</e>
        <e type="operand">a</e>
        <e type="operand">b</e>
        <e type="function" preserve="true" args="4">int</e>
        <e type="operator" args="2">:</e>
      </input>
    </math>
  </region>
  <region id="27" left="243" top="954" width="467" height="56" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Der Formalparameter expr hat keine Bedeutung, er dient nurals Platzhalter für eine eingebettete Definition beim Aufruf.</p>
    </text>
    <text lang="eng">
      <p>The argument expr has no meaninng, it just provides a placeholder for an inline definition when calling the function.  </p>
    </text>
  </region>
  <region id="28" left="36" top="999" width="185" height="75" color="#000000" bgColor="#ffffff">
    <picture>
      <raw format="png" encoding="base64">iVBORw0KGgoAAAANSUhEUgAAALEAAABDCAYAAADTc+TXAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAN+SURBVHhe7Z1dcqswDIWz/132JdtIR1AHRZFtGYSLxNHM14J+jsE+zcOdydzH60A8n8+/q2MBnXZApx0wsRLQacfVdGBiJaDTjqvpLCZ+PB4AhKPE28QIRKRomPgHgADAxCA8MDEID0wMwiNMTP/MARODWKwmJu8u/i2JNbQBcFXo3Naz0+t5EZ/Eyw+YOCwwMUwcnmJi+n0fQ8PEqZDmvYeRYeJUSNPCxOoAuDIwMUwcHpgYJg4NnZtE68sHTAzCAxOD8MDEIDwwcVroHAtaPQ8wcUq4cWFiEBJp3NxGholTktu0Epg4JTAxTByeW5vY85sd99rI43ju1xl7b9Wcf+6rid2/2TH/RXLgtW/e+z+qN/f8xSfx8uOd0AZszH2JPHjtm/f+j+rNPf8TTDz3BfLhsX+eZ7BXa54PdpiY6oVaXcvfndaecTz2z/MM9mpZ3/X4sw6a2PpgWh7M2z/PM9irZZ07/qwDJqa8RPaUvlpezo3cy5qlfoSi561Zftd0Zb70avA+TqvG4To1TZmTfdY5Dp+p9fEe7X5jwMSELvKJ1iNz/L52zXOtHlnvYenX1uD3GlZd3qP19zQsWDTkc9RmtLyc5bWRPF3X+gjZy2sbE00s0eo8x2sj9z1aa3FK32i/VivIutav9dTgfZxWrSB7ajOtfGsdq15Lg+itQ7HW11iutsT3QG9BQuvpzVG91iPzvXsPzlrDouuxlkXD8iy9fGsdq15Lg+itQ7HW11iutsT3QG9BQutpzfGaZbZ378FZa1h0PdayaFiepZbnuZE5LV/rIyzrUKy1NZarLfHZTHmJ7CloNW2WX2v3PGepybrGaB9H6yv0erhOrVfL7cGqw5+lNcNrsleblfeSMsOp9dTuNwZMPIK+2D68tTz1Cl66Xs+2R6c1M6rn9R42TjIx4fEipFHQ6qN46Ui83lXL78GqRX0Frc4Z0dTy53GiicH/Md9I/wlMnBKYGCYOD0wME4dDmvbWJvb8ZgeYB0yM/7MjBXRuBa2eF/FJvPyAiUEoYGIQHpgYhAcmBuGBiUF4YGIQHpg4HXR+Ba2eD5g4FdK49zAyTJwOOj+O1pMLmDgV0rQwsToArgxMDBOngM5PovXlASYG4YGJQXhgYhAemBiER5j485sdCESMIM9+fbMDgGiUOPQRTH8FHgGddkCnHTCxEtBpx7V0Xq9fSxWT4FMFjVgAAAAASUVORK5CYII=</raw>
    </picture>
  </region>
  <region id="29" left="18" top="1080" width="374" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p underline="true">Funktionsaufruf mit eingebetteter Definition</p>
    </text>
    <text lang="eng">
      <p underline="true">Function call with inline definition</p>
    </text>
  </region>
  <region id="30" left="27" top="1116" width="201" height="28" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">cos</e>
        <e type="operator" args="2">:</e>
        <e type="operand">0</e>
        <e type="operand">π</e>
        <e type="function" args="3">f</e>
      </input>
      <result action="numeric">
        <e type="operand">0</e>
      </result>
    </math>
  </region>
  <region id="31" left="342" top="1116" width="382" height="56" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>An Stelle des ersten Arguments wird dieFunktion g(x) eingebettet definiert. Sie wirdals lokale Definition behandelt. </p>
    </text>
    <text lang="eng">
      <p>The first argument slot is used for thedefinition of g(x). This is treated as a local definition.</p>
    </text>
  </region>
  <region id="32" left="27" top="1170" width="93" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
      </input>
      <result action="symbolic">
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
      </result>
    </math>
  </region>
  <region id="33" left="117" top="1170" width="193" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>g(x) ist außerhalb desAufrufs unbekannt.</p>
    </text>
    <text lang="eng">
      <p>g(x) is unknownoutside the call</p>
    </text>
  </region>
  <region id="34" left="342" top="1197" width="357" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Der Parameter expr erhält den Rückgabewertder eingebetteten Definition.</p>
    </text>
    <text lang="eng">
      <p>The value of expr is the result of the definition statement.</p>
    </text>
  </region>
  <region id="35" left="27" top="1242" width="681" height="56" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Im Grunde ist es egal, welchen konkreten Platzhalter in der Argumentliste eine eingebettete Definition einnimmt, außer, man will den Rückgabewert der Definition benutzen.</p>
    </text>
    <text lang="eng">
      <p>It does not matter, which particular slot of the argument list the inline definitionoccupies, except for the value of the corresponding formal parameter.</p>
    </text>
  </region>
  <region id="36" left="18" top="1305" width="324" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p underline="true">Funktionaufruf mit globaler Definition</p>
    </text>
    <text lang="eng">
      <p underline="true">Function call with global definition</p>
    </text>
  </region>
  <region id="37" left="27" top="1332" width="170" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">cos</e>
        <e type="operator" args="2">:</e>
      </input>
      <result action="symbolic">
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">cos</e>
      </result>
    </math>
  </region>
  <region id="38" left="261" top="1332" width="225" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>g(x) wird global definiert</p>
    </text>
    <text lang="eng">
      <p>global definition of g(x)</p>
    </text>
  </region>
  <region id="39" left="27" top="1359" width="121" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">a</e>
        <e type="operand">0</e>
        <e type="operand">π</e>
        <e type="function" args="3">f</e>
      </input>
      <result action="numeric">
        <e type="operand">0</e>
      </result>
    </math>
  </region>
  <region id="40" left="261" top="1368" width="446" height="56" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p>Da alle globalen Funktionen intern bekannt sind, wennsie nicht dort überschrieben werden, muss keine eingebettete Definition mehr verwendet werden.</p>
    </text>
    <text lang="eng">
      <p>function call without any function, g(x) is taken fromglobal context</p>
    </text>
  </region>
  <region id="41" left="27" top="1395" width="110" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
    <math>
      <input>
        <e type="operand">x</e>
        <e type="function" args="1">g</e>
      </input>
      <result action="symbolic">
        <e type="operand">x</e>
        <e type="function" preserve="true" args="1">cos</e>
      </result>
    </math>
  </region>
  <region id="42" left="18" top="1431" width="103" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p href="Kapitel Programmierung.sm">Programmierung</p>
    </text>
    <text lang="eng">
      <p href="Kapitel Programmierung.sm">Programming</p>
    </text>
  </region>
  <region id="43" left="18" top="1449" width="78" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p href="contents.sm">Inhalt</p>
    </text>
    <text lang="eng">
      <p href="contents.sm">Contents</p>
    </text>
  </region>
  <region id="44" left="18" top="1485" width="450" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
    <text lang="ger">
      <p italic="true">$Author: mkraska $$Date: 2014-05-01 13:05:55 +0200 (Do, 01. Mai 2014) $ </p>
    </text>
  </region>
</regions>