diff --git a/Doc/Sd1/Ref/ObjectsAndClasses/Stack/stack.multi.svg b/Doc/Sd1/Ref/ObjectsAndClasses/Stack/stack.multi.svg new file mode 100644 index 0000000000000000000000000000000000000000..e1a7ad2cc94935721e1fc140ad09aaef13f2b2c5 --- /dev/null +++ b/Doc/Sd1/Ref/ObjectsAndClasses/Stack/stack.multi.svg @@ -0,0 +1,490 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:ns1="https://launchpad.net/jessyink" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="70.046959mm" + height="47.967087mm" + viewBox="0 0 70.046966 47.967086" + version="1.1" + id="svg8" + inkscape:version="0.92.1 r15371" + sodipodi:docname="stack.multi.svg"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.6400351" + inkscape:cx="140.12574" + inkscape:cy="96.295154" + inkscape:document-units="mm" + inkscape:current-layer="g5062" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1074" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + showguides="false"> + <inkscape:grid + type="xygrid" + id="grid153" + originx="-1.4239177" + originy="-0.32290521" /> + </sodipodi:namedview> + <defs + id="defs2"> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="marker4842" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path4840" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker1748" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow2Mend" + inkscape:collect="always"> + <path + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + id="path1746" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Mend" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path1073" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow2Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Lend" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path1067" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="matrix(-1.1,0,0,-1.1,-1.1,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow2Mend" + orient="auto" + refY="0" + refX="0" + id="Arrow2Mend-9" + style="overflow:visible" + inkscape:isstock="true" + inkscape:collect="always"> + <path + inkscape:connector-curvature="0" + id="path1073-3" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" + transform="scale(-0.6)" /> + </marker> + </defs> + <metadata + id="metadata5"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + transform="translate(-1.4239073,-15.357164)" + style="display:inline" + inkscape:label="Layer 7" + id="g5078" + inkscape:groupmode="layer"> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path5064" + d="m 29.104167,27.928419 c 0,-10.583334 0,-10.583334 10.583333,-10.583334" + style="display:inline;fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1748)" /> + <text + id="text5068" + y="18.667999" + x="41.955357" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="stroke-width:0.26458332" + y="18.667999" + x="41.955357" + sodipodi:role="line" + id="tspan5066">empty(): <tspan + style="fill:#008000" + id="tspan5080">false</tspan></tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="27.544979" + y="53.280647" + id="text5072"><tspan + sodipodi:role="line" + id="tspan5070" + x="27.544979" + y="53.280647" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">1</tspan></text> + <text + id="text5076" + y="91.531288" + x="39.737396" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve" + transform="translate(-12.586607,-32.908036)"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" + y="91.531288" + x="39.737396" + id="tspan5074" + sodipodi:role="line">4</tspan></text> + </g> + <g + inkscape:groupmode="layer" + id="g4686" + inkscape:label="Layer 6" + style="display:none" + transform="translate(-1.4239073,-15.357164)"> + <path + style="display:inline;fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1748)" + d="m 29.104167,27.928419 c 0,-10.583334 0,-10.583334 10.583333,-10.583334" + id="path4666" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="41.955357" + y="18.667999" + id="text4670"><tspan + id="tspan4668" + sodipodi:role="line" + x="41.955357" + y="18.667999" + style="stroke-width:0.26458332">top(): <tspan + style="fill:#008000" + id="tspan5082">1</tspan></tspan></text> + <text + id="text4680" + y="53.280647" + x="27.544979" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" + y="53.280647" + x="27.544979" + id="tspan4678" + sodipodi:role="line">1</tspan></text> + <text + transform="translate(-12.586607,-32.908036)" + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="39.737396" + y="91.531288" + id="text4684"><tspan + sodipodi:role="line" + id="tspan4682" + x="39.737396" + y="91.531288" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">4</tspan></text> + </g> + <g + style="display:none" + inkscape:label="Layer 5" + id="g1744" + inkscape:groupmode="layer" + transform="translate(-1.4239073,-15.357164)"> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path1724" + d="m 29.104167,27.928419 c 0,-10.583334 0,-10.583334 10.583333,-10.583334" + style="display:inline;fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1748)" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="27.544979" + y="53.280647" + id="text1738"><tspan + sodipodi:role="line" + id="tspan1736" + x="27.544979" + y="53.280647" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">1</tspan></text> + <text + id="text1742" + y="91.531288" + x="39.737396" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve" + transform="translate(-12.586607,-32.908036)"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" + y="91.531288" + x="39.737396" + id="tspan1740" + sodipodi:role="line">4</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="41.620956" + y="18.697098" + id="text4670-3"><tspan + id="tspan4668-6" + sodipodi:role="line" + x="41.620956" + y="18.697098" + style="stroke-width:0.26458332">pop(): <tspan + style="fill:#008000" + id="tspan5084">7</tspan></tspan></text> + </g> + <g + inkscape:groupmode="layer" + id="layer3" + inkscape:label="Layer 4" + style="display:none" + transform="translate(-1.4239073,-15.357164)"> + <path + style="display:inline;fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-9)" + d="m 18.520833,17.345085 c 10.583333,0 10.583333,0 10.583333,10.583334" + id="path1044-4" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="1.0394347" + y="18.573505" + id="text1036-3-1"><tspan + sodipodi:role="line" + id="tspan1034-5-5" + x="1.0394347" + y="18.573505" + style="stroke-width:0.26458332">push(<tspan + style="fill:#ff0000" + id="tspan5086">7</tspan>)</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="27.450483" + y="47.799992" + id="text143"><tspan + sodipodi:role="line" + id="tspan141" + x="27.450483" + y="47.799992" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">7</tspan><tspan + sodipodi:role="line" + x="27.450483" + y="53.09166" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" + id="tspan1660" /></text> + <text + id="text1656-0" + y="53.280647" + x="27.544979" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" + y="53.280647" + x="27.544979" + id="tspan1654-8" + sodipodi:role="line">1</tspan></text> + <text + transform="translate(-12.586607,-32.908036)" + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="39.737396" + y="91.531288" + id="text139-6"><tspan + sodipodi:role="line" + id="tspan137-59" + x="39.737396" + y="91.531288" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">4</tspan></text> + </g> + <g + style="display:none" + inkscape:label="Layer 3" + id="g1658" + inkscape:groupmode="layer" + transform="translate(-1.4239073,-15.357164)"> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path1648" + d="m 18.520833,17.345085 c 10.583333,0 10.583333,0 10.583333,10.583334" + style="display:inline;fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend-9)" /> + <text + id="text1652" + y="18.573505" + x="1.0394347" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="stroke-width:0.26458332" + y="18.573505" + x="1.0394347" + id="tspan1650" + sodipodi:role="line">push(<tspan + style="fill:#ff0000" + id="tspan5088">1</tspan>)</tspan></text> + <text + id="text1656" + y="53.186153" + x="27.639473" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" + y="53.186153" + x="27.639473" + id="tspan1654" + sodipodi:role="line">1</tspan></text> + <text + transform="translate(-12.586607,-32.908036)" + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="39.737396" + y="91.720276" + id="text139-3"><tspan + sodipodi:role="line" + id="tspan137-5" + x="39.737396" + y="91.720276" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">4</tspan></text> + </g> + <g + transform="translate(-14.010514,-48.2652)" + inkscape:groupmode="layer" + id="layer2" + inkscape:label="Layer 2" + style="display:none"> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="73.524055" + y="52.45573" + id="text135"><tspan + sodipodi:role="line" + id="tspan133" + x="73.524055" + y="56.201237" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332" /></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.23333311px;line-height:1.25;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="39.737392" + y="91.720276" + id="text139"><tspan + sodipodi:role="line" + id="tspan137" + x="39.737392" + y="91.720276" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';stroke-width:0.26458332">4</tspan></text> + <path + style="fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend)" + d="m 31.107441,50.253121 c 10.583333,0 10.583333,0 10.583333,10.583334" + id="path1044" + inkscape:connector-curvature="0" + sodipodi:nodetypes="cc" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + x="13.626042" + y="51.481541" + id="text1036-3"><tspan + sodipodi:role="line" + id="tspan1034-5" + x="13.626042" + y="51.481541" + style="stroke-width:0.26458332">push(<tspan + style="fill:#ff0000" + id="tspan5090">4</tspan>)</tspan></text> + </g> + <g + transform="translate(-1.4239073,-15.357164)" + style="display:none" + inkscape:label="Layer 1" + id="g5062" + inkscape:groupmode="layer"> + <path + sodipodi:nodetypes="cc" + inkscape:connector-curvature="0" + id="path5048" + d="m 29.104167,27.928419 c 0,-10.583334 0,-10.583334 10.583333,-10.583334" + style="display:inline;fill:none;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker1748)" /> + <text + id="text5052" + y="18.667999" + x="41.955357" + style="font-style:normal;font-weight:normal;font-size:4.23333311px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + xml:space="preserve"><tspan + style="stroke-width:0.26458332" + y="18.667999" + x="41.955357" + sodipodi:role="line" + id="tspan5050">empty(): <tspan + style="fill:#008000" + id="tspan5092">true</tspan></tspan></text> + </g> + <g + ns1:masterSlide="masterSlide" + transform="translate(-14.010514,-48.2652)" + inkscape:label="Master" + inkscape:groupmode="layer" + id="layer1" + style="display:inline" + sodipodi:insensitive="true"> + <path + style="display:inline;fill:none;stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 35.07619,59.513538 v 35.71875 h 13.229167 v -35.71875" + id="path155-1" + inkscape:connector-curvature="0" /> + </g> +</svg> diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index f3b6d837c19782ae5efe80ea9eb96731edf292c5..c0c5700c77c7703b4a969df10505652fbeb03944 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -5076,7 +5076,7 @@ Largest long value:9223372036854775807</screen></td> </section> <section xml:id="sd1MathMaxAbs"> - <title>Building a private library of mathematical functions.</title> + <title>Building a library of mathematical functions.</title> <para>The following sections provide exercises on implementing mathematical functions. We start with an easy one.</para> @@ -8192,6 +8192,252 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </section> </section> + <section xml:id="set_sd1_methodCallingDetails"> + <title>Method calls, the details</title> + + <figure xml:id="sd1_fig_callingMethods"> + <title>Method calling</title> + + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="java">public class Circle { + + static final double + PI = 3.141592653589793; + double r; + + /** Change a circle's area + * @param area The desired new area + * @return The circle's new radius */ + double setArea(final double area <co linkends="sd1_fig_callingMethods-1" + xml:id="sd1_fig_callingMethods-1-co"/>) { + double val <co linkends="sd1_fig_callingMethods-2" + xml:id="sd1_fig_callingMethods-2-co"/> = area / PI <co + linkends="sd1_fig_callingMethods-3" + xml:id="sd1_fig_callingMethods-3-co"/>; + return <co linkends="sd1_fig_callingMethods-4" + xml:id="sd1_fig_callingMethods-4-co"/> r <co + linkends="sd1_fig_callingMethods-5" + xml:id="sd1_fig_callingMethods-5-co"/>= Math.sqrt(val); + } +}</programlisting></td> + + <td valign="top"><calloutlist> + <callout arearefs="sd1_fig_callingMethods-1-co" + xml:id="sd1_fig_callingMethods-1"> + <para>Passing arguments.</para> + </callout> + + <callout arearefs="sd1_fig_callingMethods-2-co" + xml:id="sd1_fig_callingMethods-2"> + <para>Defining method local local variables.</para> + </callout> + + <callout arearefs="sd1_fig_callingMethods-3-co" + xml:id="sd1_fig_callingMethods-3"> + <para>Accessing class variable.</para> + </callout> + + <callout arearefs="sd1_fig_callingMethods-4-co" + xml:id="sd1_fig_callingMethods-4"> + <para>returning values.</para> + </callout> + + <callout arearefs="sd1_fig_callingMethods-5-co" + xml:id="sd1_fig_callingMethods-5"> + <para>Accessing instance variable.</para> + </callout> + </calloutlist></td> + </tr> + </informaltable> + </figure> + + <figure xml:id="sd1_fig_callingMethodsThreeVarCategories"> + <title>Three variable scopes</title> + + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="java">public class Circle { + + static final double + PI <co linkends="sd1_fig_callingMethodsThreeVarCategories-1" + xml:id="sd1_fig_callingMethodsThreeVarCategories-1-co"/> = 3.141592653589793; + + double r <co linkends="sd1_fig_callingMethodsThreeVarCategories-2" + xml:id="sd1_fig_callingMethodsThreeVarCategories-2-co"/> ; + + double setArea(final double area <co + linkends="sd1_fig_callingMethodsThreeVarCategories-3" + xml:id="sd1_fig_callingMethodsThreeVarCategories-3-co"/>) { + double val <coref linkend="sd1_fig_callingMethodsThreeVarCategories-3-co"/> ... + ... + } +}</programlisting></td> + + <td valign="top"><calloutlist> + <callout arearefs="sd1_fig_callingMethodsThreeVarCategories-1-co" + xml:id="sd1_fig_callingMethodsThreeVarCategories-1"> + <para>Class scope.</para> + </callout> + + <callout arearefs="sd1_fig_callingMethodsThreeVarCategories-2-co" + xml:id="sd1_fig_callingMethodsThreeVarCategories-2"> + <para>Instance scope</para> + </callout> + + <callout arearefs="sd1_fig_callingMethodsThreeVarCategories-3-co" + xml:id="sd1_fig_callingMethodsThreeVarCategories-3"> + <para>Method scope</para> + </callout> + </calloutlist></td> + </tr> + </informaltable> + </figure> + + <figure xml:id="sd1_fig_scopeLifetimes"> + <title>Scope lifetimes</title> + + <glosslist> + <glossentry> + <glossterm>Class scope</glossterm> + + <glossdef> + <para>Application.</para> + </glossdef> + </glossentry> + + <glossentry> + <glossterm>Instance scope</glossterm> + + <glossdef> + <para>Object lifetime: <code>new ...()</code> until being garbage + collected.</para> + </glossdef> + </glossentry> + + <glossentry> + <glossterm>Method scope</glossterm> + + <glossdef> + <para>During method call until (possibly implicit) + <code>return</code>.</para> + </glossdef> + </glossentry> + </glosslist> + </figure> + + <figure xml:id="sd1_fig_runtimeMemoryClasses"> + <title>Two runtime memory categories</title> + + <glosslist> + <glossentry> + <glossterm>Heap memory</glossterm> + + <glossdef> + <itemizedlist> + <listitem> + <para>Allocation by <code>new Classname ()</code>.</para> + </listitem> + + <listitem> + <para>De-allocation subject to garbage collection.</para> + </listitem> + </itemizedlist> + </glossdef> + </glossentry> + + <glossentry> + <glossterm>Execution stack</glossterm> + + <glossdef> + <itemizedlist> + <listitem> + <para>One instance per process thread.</para> + </listitem> + + <listitem> + <para>Hosting method bound variables.</para> + </listitem> + </itemizedlist> + </glossdef> + </glossentry> + </glosslist> + </figure> + + <figure xml:id="sd1_stack"> + <title>Stack: Four operations</title> + + <informaltable border="0"> + <colgroup width="8%"/> + + <colgroup width="92%"/> + + <tr> + <td valign="top"><emphasis role="bold">push</emphasis></td> + + <td valign="top"><para>Put an object on top of existing + objects.</para></td> + </tr> + + <tr> + <td valign="top"><emphasis role="bold">pop</emphasis></td> + + <td valign="top"><para>Retrieve the topmost object thereby removing + it from the stack. Precondition: Stack must not be + empty.</para></td> + </tr> + + <tr> + <td valign="top"><emphasis role="bold">top</emphasis></td> + + <td valign="top"><para>Access the stack's topmost object leaving it + in place. Read only. <emphasis role="bold">Precondition</emphasis>: + Stack must not be empty.</para></td> + </tr> + + <tr> + <td valign="top"><emphasis role="bold">empty</emphasis></td> + + <td valign="top"><para><code>true</code> if and only if the stack is + empty. Read only.</para></td> + </tr> + </informaltable> + </figure> + + <figure xml:id="sd1_fig_stackIntAnimation"> + <title>Example: Storing integer values</title> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/ObjectsAndClasses/Stack/stack.multi.svg"/> + </imageobject> + </mediaobject> + </figure> + + <figure xml:id="sd1_fig_stackIntExecution"> + <title>Method calling</title> + + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="java">final Stack<Integer> si = + new Stack<>(); +si.push(4); +si.push(1); +si.push(7); +System.out.println("Top: " + si.peek()); // top +while (! si.empty()) { + System.out.println("Not empty: " + si.pop()); +}</programlisting></td> + + <td valign="top"><screen>Top: 7 +Not empty: 7 +Not empty: 1 +Not empty: 4</screen></td> + </tr> + </informaltable> + </figure> + </section> + <section xml:id="sd1_sect_unitTestExample"> <title>A unit testing example</title>