{"id":1232,"date":"2023-09-22T08:47:44","date_gmt":"2023-09-22T06:47:44","guid":{"rendered":"http:\/\/oopm.org\/?page_id=1232"},"modified":"2025-01-14T12:07:51","modified_gmt":"2025-01-14T11:07:51","slug":"6-subclasses-and-block-structure","status":"publish","type":"page","link":"https:\/\/oopm.org\/?page_id=1232","title":{"rendered":"10. Nested classes and block structure"},"content":{"rendered":"<div class=\"pdfprnt-buttons pdfprnt-buttons-page pdfprnt-top-right\"><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages1232&print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"View PDF\" \/><\/a><a href=\"https:\/\/oopm.org\/index.php?rest_route=wpv2pages1232&print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\"><img decoding=\"async\" src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Print Content\" \/><\/a><\/div>\n<p class=\"wp-block-paragraph\">This section will introduce the notion of nested classes, i.e classes that are defined as part of of an enclosing class. We have seen nesting before: methods are nested within the class where the methods are declared. The new thing here is that classes are nested within a class. The general notion of nesting, however, is not new. Algol 60 had e.g. procedures as part of procedures, and many languages may have nested blocks of program text; nesting is therefore also known as block structure. SIMULA introduced nested classes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the next pages we illustrate nested classes by three examples: (1) the first example is representing a context-free grammar, (2) the next example is in the domain of flights and flight routes, and (3) the final example is in the domain of text processing.<\/p>\n<div style=\"display:flex; gap:10px;justify-content:center\" class=\"wps-pgfw-pdf-generate-icon__wrapper-frontend\">\n\t\t<a  href=\"https:\/\/oopm.org?action=genpdf&amp;id=1232\" class=\"pgfw-single-pdf-download-button\" ><img src=\"https:\/\/oopm.org\/wp-content\/plugins\/pdf-generator-for-wp\/admin\/src\/images\/PDF_Tray.svg\" title=\"Generate PDF\" style=\"width:auto; height:45px;\"><\/a>\n\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>This section will introduce the notion of nested classes, i.e classes that are defined as part of of an enclosing class. We have seen nesting before: methods are nested within the class where the methods are declared. The new thing here is that classes are nested within a class. The general notion of nesting, however, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":21,"menu_order":10,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1232","page","type-page","status-publish","hentry"],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1232"}],"version-history":[{"count":43,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1232\/revisions"}],"predecessor-version":[{"id":11107,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/1232\/revisions\/11107"}],"up":[{"embeddable":true,"href":"https:\/\/oopm.org\/index.php?rest_route=\/wp\/v2\/pages\/21"}],"wp:attachment":[{"href":"https:\/\/oopm.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}