CINXE.COM
結構化編程 - 維基百科,自由嘅百科全書
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="yue" dir="ltr"> <head> <meta charset="UTF-8"> <title>結構化編程 - 維基百科,自由嘅百科全書</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )zh_yuewikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "yue","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRequestId":"581db769-c337-4254-9918-d890ce7462c4","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"結構化編程","wgTitle":"結構化編程","wgCurRevisionId":2155062,"wgRevisionId":2155062,"wgArticleId":207008,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Pages using deprecated source tags","模用重複參數嘅版面","有英文嘅文章","編程","編程範式"],"wgPageViewLanguage":"yue","wgPageContentLanguage":"yue","wgPageContentModel":"wikitext","wgRelevantPageName":"結構化編程","wgRelevantArticleId":207008,"wgTempUserName":null,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true, "wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"yue","pageLanguageDir":"ltr","pageVariantFallbacks":"yue"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":2000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q223335","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.charinsert-styles":"ready","ext.globalCssJs.user.styles":"ready","site.styles": "ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.HanTS-conv","ext.gadget.refToolbar","ext.gadget.charinsert","ext.gadget.internalLinkHelper-altcolor","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth", "ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=yue&modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=yue&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=yue&modules=ext.gadget.charinsert-styles&only=styles&skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=yue&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="結構化編程 - 維基百科,自由嘅百科全書"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//zh-yue.m.wikipedia.org/wiki/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B"> <link rel="alternate" type="application/x-wiki" title="編輯" href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="維基百科 (yue)"> <link rel="EditURI" type="application/rsd+xml" href="//zh-yue.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://zh-yue.wikipedia.org/wiki/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh-yue"> <link rel="alternate" type="application/atom+xml" title="維基百科嘅Atom Feed" href="/w/index.php?title=Special:%E6%9C%80%E8%BF%91%E4%BF%AE%E6%94%B9&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-結構化編程 rootpage-結構化編程 skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">跳去內容</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="站點"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="主目錄" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">主目錄</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">主目錄</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">收埋</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> 導覽 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/%E9%A0%AD%E7%89%88" title="睇頭版[z]" accesskey="z"><span>頭版</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Portal:%E7%9B%AE%E9%8C%84"><span>目錄</span></a></li><li id="n-featuredcontent" class="mw-list-item"><a href="/wiki/Portal:%E6%AD%A3%E5%98%A2"><span>正嘢</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:%E6%99%82%E4%BA%BA%E6%99%82%E4%BA%8B" title="提供而家發生嘅事嘅背景資料"><span>時人時事</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:%E6%98%AF%E4%BD%86%E4%B8%80%E7%89%88" title="是但載入一版[x]" accesskey="x"><span>是但一版</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:%E9%97%9C%E6%96%BC"><span>關於維基百科</span></a></li><li id="n-聯絡處" class="mw-list-item"><a href="/wiki/Wikipedia:%E8%81%AF%E7%B5%A1%E6%88%91%E5%93%8B"><span>聯絡處</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> 交流 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-說明書" class="mw-list-item"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents"><span>說明書</span></a></li><li id="n-城市論壇" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%9F%8E%E5%B8%82%E8%AB%96%E5%A3%87"><span>城市論壇</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:%E7%A4%BE%E5%8D%80%E5%A4%A7%E5%A0%82" title="關於呢個計劃,你可以做乜,應該要點做"><span>社區大堂</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:%E6%9C%80%E8%BF%91%E4%BF%AE%E6%94%B9" title="列出呢個 wiki 中嘅最近修改[r]" accesskey="r"><span>最近修改</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/%E9%A0%AD%E7%89%88" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="維基百科" src="/static/images/mobile/copyright/wikipedia-wordmark-zh_yue.svg" style="width: 7.5em; height: 1.625em;"> <img class="mw-logo-tagline" alt="" src="/static/images/mobile/copyright/wikipedia-tagline-zh_yue.svg" width="120" height="16" style="width: 7.5em; height: 1em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:%E6%90%9C%E7%B4%A2" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="搵維基百科[f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>查嘢</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="搵維基百科" aria-label="搵維基百科" autocapitalize="sentences" title="搵維基百科[f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:搜索"> </div> <button class="cdx-button cdx-search-input__end-button">搵嘢</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="個人架生"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="閱讀設定"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="閱讀設定" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">閱讀設定</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_zh-yue.wikipedia.org&uselang=yue" class=""><span>捐畀維基百科</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E9%96%8B%E6%88%B6&returnto=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" title="建議你開返個戶口簽到,不過唔做都無所謂。" class=""><span>開戶口</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E7%B0%BD%E5%88%B0&returnto=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" title="唔係是必要簽到,但建議你噉做。[o]" accesskey="o" class=""><span>簽到</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out user-links-collapsible-item" title="多啲選項" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="個人架生" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">個人架生</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="用戶選單" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_zh-yue.wikipedia.org&uselang=yue"><span>捐畀維基百科</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E9%96%8B%E6%88%B6&returnto=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" title="建議你開返個戶口簽到,不過唔做都無所謂。"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>開戶口</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E7%B0%BD%E5%88%B0&returnto=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" title="唔係是必要簽到,但建議你噉做。[o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>簽到</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="站點"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="目錄" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">目錄</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">收埋</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">文頭</div> </a> </li> <li id="toc-概論" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#概論"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>概論</span> </div> </a> <ul id="toc-概論-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-嗌法" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#嗌法"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>嗌法</span> </div> </a> <ul id="toc-嗌法-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-睇埋" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#睇埋"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>睇埋</span> </div> </a> <ul id="toc-睇埋-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-引述" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#引述"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>引述</span> </div> </a> <ul id="toc-引述-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="目錄" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="開/收內容一覽" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">開/收內容一覽</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">結構化編程</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="去睇另一種語文嘅文章。有46種語言版本。" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-46" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">46種語言</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D8%A8%D8%B1%D9%85%D8%AC%D8%A9_%D9%85%D9%87%D9%8A%D9%83%D9%84%D8%A9" title="برمجة مهيكلة – 阿拉伯文" lang="ar" hreflang="ar" data-title="برمجة مهيكلة" data-language-autonym="العربية" data-language-local-name="阿拉伯文" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-ast mw-list-item"><a href="https://ast.wikipedia.org/wiki/Programaci%C3%B3n_estructurada" title="Programación estructurada – 阿斯圖里亞文" lang="ast" hreflang="ast" data-title="Programación estructurada" data-language-autonym="Asturianu" data-language-local-name="阿斯圖里亞文" class="interlanguage-link-target"><span>Asturianu</span></a></li><li class="interlanguage-link interwiki-az mw-list-item"><a href="https://az.wikipedia.org/wiki/Strukturlu_proqramla%C5%9Fd%C4%B1rma" title="Strukturlu proqramlaşdırma – 亞塞拜然文" lang="az" hreflang="az" data-title="Strukturlu proqramlaşdırma" data-language-autonym="Azərbaycanca" data-language-local-name="亞塞拜然文" class="interlanguage-link-target"><span>Azərbaycanca</span></a></li><li class="interlanguage-link interwiki-be-x-old mw-list-item"><a href="https://be-tarask.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%BD%D0%B0%D0%B5_%D0%BF%D1%80%D0%B0%D0%B3%D1%80%D0%B0%D0%BC%D0%B0%D0%B2%D0%B0%D0%BD%D1%8C%D0%BD%D0%B5" title="Структурнае праграмаваньне – Belarusian (Taraškievica orthography)" lang="be-tarask" hreflang="be-tarask" data-title="Структурнае праграмаваньне" data-language-autonym="Беларуская (тарашкевіца)" data-language-local-name="Belarusian (Taraškievica orthography)" class="interlanguage-link-target"><span>Беларуская (тарашкевіца)</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%BD%D0%BE_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%B8%D1%80%D0%B0%D0%BD%D0%B5" title="Структурно програмиране – 保加利亞文" lang="bg" hreflang="bg" data-title="Структурно програмиране" data-language-autonym="Български" data-language-local-name="保加利亞文" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Programaci%C3%B3_estructurada" title="Programació estructurada – 加泰羅尼亞文" lang="ca" hreflang="ca" data-title="Programació estructurada" data-language-autonym="Català" data-language-local-name="加泰羅尼亞文" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/Strukturovan%C3%A9_programov%C3%A1n%C3%AD" title="Strukturované programování – 捷克文" lang="cs" hreflang="cs" data-title="Strukturované programování" data-language-autonym="Čeština" data-language-local-name="捷克文" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Struktureret_programmering" title="Struktureret programmering – 丹麥文" lang="da" hreflang="da" data-title="Struktureret programmering" data-language-autonym="Dansk" data-language-local-name="丹麥文" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Strukturierte_Programmierung" title="Strukturierte Programmierung – 德文" lang="de" hreflang="de" data-title="Strukturierte Programmierung" data-language-autonym="Deutsch" data-language-local-name="德文" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Structured_programming" title="Structured programming – 英文" lang="en" hreflang="en" data-title="Structured programming" data-language-autonym="English" data-language-local-name="英文" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Programaci%C3%B3n_estructurada" title="Programación estructurada – 西班牙文" lang="es" hreflang="es" data-title="Programación estructurada" data-language-autonym="Español" data-language-local-name="西班牙文" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-et mw-list-item"><a href="https://et.wikipedia.org/wiki/Struktureeritud_programmeerimine" title="Struktureeritud programmeerimine – 愛沙尼亞文" lang="et" hreflang="et" data-title="Struktureeritud programmeerimine" data-language-autonym="Eesti" data-language-local-name="愛沙尼亞文" class="interlanguage-link-target"><span>Eesti</span></a></li><li class="interlanguage-link interwiki-eu mw-list-item"><a href="https://eu.wikipedia.org/wiki/Programazio_egituratu" title="Programazio egituratu – 巴斯克文" lang="eu" hreflang="eu" data-title="Programazio egituratu" data-language-autonym="Euskara" data-language-local-name="巴斯克文" class="interlanguage-link-target"><span>Euskara</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C_%D8%B3%D8%A7%D8%AE%D8%AA%E2%80%8C%DB%8C%D8%A7%D9%81%D8%AA%D9%87" title="برنامهنویسی ساختیافته – 波斯文" lang="fa" hreflang="fa" data-title="برنامهنویسی ساختیافته" data-language-autonym="فارسی" data-language-local-name="波斯文" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Rakenteinen_ohjelmointi" title="Rakenteinen ohjelmointi – 芬蘭文" lang="fi" hreflang="fi" data-title="Rakenteinen ohjelmointi" data-language-autonym="Suomi" data-language-local-name="芬蘭文" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Programmation_structur%C3%A9e" title="Programmation structurée – 法文" lang="fr" hreflang="fr" data-title="Programmation structurée" data-language-autonym="Français" data-language-local-name="法文" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Programaci%C3%B3n_estruturada" title="Programación estruturada – 加里西亞文" lang="gl" hreflang="gl" data-title="Programación estruturada" data-language-autonym="Galego" data-language-local-name="加里西亞文" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%AA%D7%9B%D7%A0%D7%95%D7%AA_%D7%9E%D7%95%D7%91%D7%A0%D7%94" title="תכנות מובנה – 希伯來文" lang="he" hreflang="he" data-title="תכנות מובנה" data-language-autonym="עברית" data-language-local-name="希伯來文" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/Strukturirano_programiranje" title="Strukturirano programiranje – 克羅埃西亞文" lang="hr" hreflang="hr" data-title="Strukturirano programiranje" data-language-autonym="Hrvatski" data-language-local-name="克羅埃西亞文" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Struktur%C3%A1lt_programoz%C3%A1s" title="Strukturált programozás – 匈牙利文" lang="hu" hreflang="hu" data-title="Strukturált programozás" data-language-autonym="Magyar" data-language-local-name="匈牙利文" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Pemrograman_terstruktur" title="Pemrograman terstruktur – 印尼文" lang="id" hreflang="id" data-title="Pemrograman terstruktur" data-language-autonym="Bahasa Indonesia" data-language-local-name="印尼文" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-io mw-list-item"><a href="https://io.wikipedia.org/wiki/Strukturala_programifo" title="Strukturala programifo – 伊多文" lang="io" hreflang="io" data-title="Strukturala programifo" data-language-autonym="Ido" data-language-local-name="伊多文" class="interlanguage-link-target"><span>Ido</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Programmazione_strutturata" title="Programmazione strutturata – 義大利文" lang="it" hreflang="it" data-title="Programmazione strutturata" data-language-autonym="Italiano" data-language-local-name="義大利文" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E6%A7%8B%E9%80%A0%E5%8C%96%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0" title="構造化プログラミング – 日文" lang="ja" hreflang="ja" data-title="構造化プログラミング" data-language-autonym="日本語" data-language-local-name="日文" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EA%B5%AC%EC%A1%B0%EC%A0%81_%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D" title="구조적 프로그래밍 – 韓文" lang="ko" hreflang="ko" data-title="구조적 프로그래밍" data-language-autonym="한국어" data-language-local-name="韓文" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikipedia.org/wiki/Programmatura_ordinata" title="Programmatura ordinata – 拉丁文" lang="la" hreflang="la" data-title="Programmatura ordinata" data-language-autonym="Latina" data-language-local-name="拉丁文" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Strukt%C5%ABrinis_programavimas" title="Struktūrinis programavimas – 立陶宛文" lang="lt" hreflang="lt" data-title="Struktūrinis programavimas" data-language-autonym="Lietuvių" data-language-local-name="立陶宛文" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-mk mw-list-item"><a href="https://mk.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%BD%D0%BE_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%B8%D1%80%D0%B0%D1%9A%D0%B5" title="Структурно програмирање – 馬其頓文" lang="mk" hreflang="mk" data-title="Структурно програмирање" data-language-autonym="Македонски" data-language-local-name="馬其頓文" class="interlanguage-link-target"><span>Македонски</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%B8%E0%B5%8D%E0%B4%9F%E0%B5%8D%E0%B4%B0%E0%B4%95%E0%B5%8D%E0%B4%9A%E0%B5%87%E0%B5%BC%E0%B4%A1%E0%B5%8D_%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B4%97%E0%B5%8D%E0%B4%B0%E0%B4%BE%E0%B4%AE%E0%B4%BF%E0%B4%99%E0%B5%8D" title="സ്ട്രക്ചേർഡ് പ്രോഗ്രാമിങ് – 馬來亞拉姆文" lang="ml" hreflang="ml" data-title="സ്ട്രക്ചേർഡ് പ്രോഗ്രാമിങ്" data-language-autonym="മലയാളം" data-language-local-name="馬來亞拉姆文" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/Pengaturcaraan_berstruktur" title="Pengaturcaraan berstruktur – 馬來文" lang="ms" hreflang="ms" data-title="Pengaturcaraan berstruktur" data-language-autonym="Bahasa Melayu" data-language-local-name="馬來文" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Gestructureerd_programmeren" title="Gestructureerd programmeren – 荷蘭文" lang="nl" hreflang="nl" data-title="Gestructureerd programmeren" data-language-autonym="Nederlands" data-language-local-name="荷蘭文" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Strukturert_programmering" title="Strukturert programmering – 巴克摩挪威文" lang="nb" hreflang="nb" data-title="Strukturert programmering" data-language-autonym="Norsk bokmål" data-language-local-name="巴克摩挪威文" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Programowanie_strukturalne" title="Programowanie strukturalne – 波蘭文" lang="pl" hreflang="pl" data-title="Programowanie strukturalne" data-language-autonym="Polski" data-language-local-name="波蘭文" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Programa%C3%A7%C3%A3o_estruturada" title="Programação estruturada – 葡萄牙文" lang="pt" hreflang="pt" data-title="Programação estruturada" data-language-autonym="Português" data-language-local-name="葡萄牙文" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Programare_structurat%C4%83" title="Programare structurată – 羅馬尼亞文" lang="ro" hreflang="ro" data-title="Programare structurată" data-language-autonym="Română" data-language-local-name="羅馬尼亞文" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%BD%D0%BE%D0%B5_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5" title="Структурное программирование – 俄文" lang="ru" hreflang="ru" data-title="Структурное программирование" data-language-autonym="Русский" data-language-local-name="俄文" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-rue mw-list-item"><a href="https://rue.wikipedia.org/wiki/%D0%A8%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B5_%D0%BF%D1%80%D0%BE%D2%91%D1%80%D0%B0%D0%BC%D0%BE%D0%B2%D0%B0%D0%BD%D1%8F" title="Штруктуроване проґрамованя – 盧森尼亞文" lang="rue" hreflang="rue" data-title="Штруктуроване проґрамованя" data-language-autonym="Русиньскый" data-language-local-name="盧森尼亞文" class="interlanguage-link-target"><span>Русиньскый</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Strukturirano_programiranje" title="Strukturirano programiranje – 塞爾維亞克羅埃西亞文" lang="sh" hreflang="sh" data-title="Strukturirano programiranje" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="塞爾維亞克羅埃西亞文" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/Strukturirano_programiranje" title="Strukturirano programiranje – 塞爾維亞文" lang="sr" hreflang="sr" data-title="Strukturirano programiranje" data-language-autonym="Српски / srpski" data-language-local-name="塞爾維亞文" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Strukturerad_programmering" title="Strukturerad programmering – 瑞典文" lang="sv" hreflang="sv" data-title="Strukturerad programmering" data-language-autonym="Svenska" data-language-local-name="瑞典文" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-sw mw-list-item"><a href="https://sw.wikipedia.org/wiki/Uprogramishaji_unde" title="Uprogramishaji unde – 史瓦希里文" lang="sw" hreflang="sw" data-title="Uprogramishaji unde" data-language-autonym="Kiswahili" data-language-local-name="史瓦希里文" class="interlanguage-link-target"><span>Kiswahili</span></a></li><li class="interlanguage-link interwiki-ta mw-list-item"><a href="https://ta.wikipedia.org/wiki/%E0%AE%92%E0%AE%B4%E0%AF%81%E0%AE%99%E0%AF%8D%E0%AE%95%E0%AF%81%E0%AE%9A%E0%AE%BE%E0%AE%B0%E0%AF%8D_%E0%AE%A8%E0%AE%BF%E0%AE%B0%E0%AE%B2%E0%AE%BE%E0%AE%95%E0%AF%8D%E0%AE%95%E0%AE%AE%E0%AF%8D" title="ஒழுங்குசார் நிரலாக்கம் – 坦米爾文" lang="ta" hreflang="ta" data-title="ஒழுங்குசார் நிரலாக்கம்" data-language-autonym="தமிழ்" data-language-local-name="坦米爾文" class="interlanguage-link-target"><span>தமிழ்</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Yap%C4%B1sal_programlama" title="Yapısal programlama – 土耳其文" lang="tr" hreflang="tr" data-title="Yapısal programlama" data-language-autonym="Türkçe" data-language-local-name="土耳其文" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%A1%D1%82%D1%80%D1%83%D0%BA%D1%82%D1%83%D1%80%D0%BD%D0%B5_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F" title="Структурне програмування – 烏克蘭文" lang="uk" hreflang="uk" data-title="Структурне програмування" data-language-autonym="Українська" data-language-local-name="烏克蘭文" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/L%E1%BA%ADp_tr%C3%ACnh_c%E1%BA%A5u_tr%C3%BAc" title="Lập trình cấu trúc – 越南文" lang="vi" hreflang="vi" data-title="Lập trình cấu trúc" data-language-autonym="Tiếng Việt" data-language-local-name="越南文" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E7%BB%93%E6%9E%84%E5%8C%96%E7%BC%96%E7%A8%8B" title="结构化编程 – 中文" lang="zh" hreflang="zh" data-title="结构化编程" data-language-autonym="中文" data-language-local-name="中文" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q223335#sitelinks-wikipedia" title="改跨語言拎" class="wbc-editpage">改拎</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="空間名"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" title="睇吓內容頁[c]" accesskey="c"><span>文章</span></a></li><li id="ca-talk" class="new vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Talk:%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit&redlink=1" rel="discussion" class="new" title="關於內容頁嘅討論 (無呢版)[t]" accesskey="t"><span>討論</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="改語言變體" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">粵語</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="外觀"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B"><span>閱</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit" title="改呢版嘅代碼[e]" accesskey="e"><span>改</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=history" title="呢一頁之前嘅修訂[h]" accesskey="h"><span>睇返紀錄</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="頁面工具"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="架撐" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">架撐</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">架撐</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">收埋</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="多啲選項" > <div class="vector-menu-heading"> 動作 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B"><span>閱</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit" title="改呢版嘅代碼[e]" accesskey="e"><span>改</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=history"><span>睇返紀錄</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> 基本 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:%E9%82%8A%E5%BA%A6%E9%8F%88%E5%8E%BB%E5%91%A2%E7%89%88/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" title="列出所有連接過嚟呢度嘅頁面[j]" accesskey="j"><span>有乜連過嚟</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:%E5%A4%96%E9%8F%88%E4%BF%AE%E6%94%B9/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" rel="nofollow" title="由呢版連出去嘅版嘅最近修改[k]" accesskey="k"><span>連結頁嘅更改</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Project:%E4%B8%8A%E8%BC%89" title="上載檔案[u]" accesskey="u"><span>上載檔案</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:%E5%B0%88%E9%96%80%E7%89%88" title="所有專門版一覽[q]" accesskey="q"><span>專門版</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&oldid=2155062" title="呢版呢個修訂嘅永久網址"><span>固定連結</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=info" title="多啲同呢版有拏褦嘅資料"><span>此版明細</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:%E5%BC%95%E7%94%A8&page=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&id=2155062&wpFormIdentifier=titleform" title="點樣引用呢頁嘅資訊"><span>引用呢篇文</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fzh-yue.wikipedia.org%2Fwiki%2F%25E7%25B5%2590%25E6%25A7%258B%25E5%258C%2596%25E7%25B7%25A8%25E7%25A8%258B"><span>攞短網址</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fzh-yue.wikipedia.org%2Fwiki%2F%25E7%25B5%2590%25E6%25A7%258B%25E5%258C%2596%25E7%25B7%25A8%25E7%25A8%258B"><span>下載QR code</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> 打印/匯出 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=show-download-screen"><span>下載PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="呢一版印得嘅版本[p]" accesskey="p"><span>印得嘅版本</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> 第啲維基項目 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Structured_programming" hreflang="en"><span>維基同享</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q223335" title="連到接住資料儲存庫嘅項目[g]" accesskey="g"><span>維基數據項</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="頁面工具"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="閱讀設定"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">閱讀設定</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">收埋</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">出自維基百科,自由嘅百科全書</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="yue" dir="ltr"><p><b>結構化編程</b>(<a href="/wiki/Wikipedia:%E7%B2%B5%E6%96%87%E6%8B%BC%E9%9F%B3" title="Wikipedia:粵文拼音">粵拼</a>:<span class="plainlinks" style="display:inline-block"><a rel="nofollow" class="external text" href="http://yue.forvo.com/word/yue/結構化編程/#yue"><span>git<span class="Jpingtone">3</span> gau<span class="Jpingtone">3</span>/kau<span class="Jpingtone">3</span> faa<span class="Jpingtone">3</span> pin<span class="Jpingtone">1</span> cing<span class="Jpingtone">4</span></span></a></span>)係一種源自 1950 年代嘅<a href="/wiki/%E7%B7%A8%E7%A8%8B%E7%AF%84%E5%BC%8F" class="mw-redirect" title="編程範式">編程範式</a>,旨在透過語法將<a href="/wiki/%E6%8E%A7%E5%88%B6%E6%B5%81%E7%A8%8B" title="控制流程">流程控制</a>嘅結構形式化,令到可以睇到出個程式嘅流程,同用不變式(invariant)來確定計算上嘅邏輯<sup id="cite_ref-Sethi_(1989)_1-0" class="reference"><a href="#cite_note-Sethi_(1989)-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup class="reference" style="white-space:nowrap;">:66, 74</sup>,從而令<a href="/wiki/%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F" title="電腦程式">電腦程式</a>更加清晰同高品質,以及減少<a href="/wiki/%E7%B7%A8%E7%A8%8B" class="mw-redirect" title="編程">程式製作</a>所需嘅時間。 </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="概論"><span id=".E6.A6.82.E8.AB.96"></span>概論</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit&section=1" title="編輯小節: 概論"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <div role="note" class="hatnote">睇埋:<a href="/wiki/%E6%B5%81%E7%A8%8B%E6%8E%A7%E5%88%B6" class="mw-redirect" title="流程控制">流程控制</a></div> <p>下面呢段<a href="/wiki/%E8%99%9B%E6%93%AC%E7%A2%BC" title="虛擬碼">虛擬碼</a>,會令個程式行<a href="/wiki/%E5%AD%90%E7%A8%8B%E5%BC%8F" title="子程式">子程式</a> a 三次,等個程式員唔使將子程式 a 段碼寫三次,可以慳返啲位<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>: </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="n">子程式</span><span class="w"> </span><span class="n">a</span> <span class="w"> </span><span class="err">(</span><span class="n">講好個子程式包含乜陳述式</span><span class="err">)</span> <span class="w"> </span><span class="n">行子程式</span><span class="w"> </span><span class="n">a</span> <span class="w"> </span><span class="n">行子程式</span><span class="w"> </span><span class="n">a</span> <span class="w"> </span><span class="n">行子程式</span><span class="w"> </span><span class="n">a</span> </pre></div> <p>如果冇咗子程式嘅使用,呢段碼就會變成<sup id="cite_ref-dijkstra1970_3-0" class="reference"><a href="#cite_note-dijkstra1970-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>: </p> <div class="mw-highlight mw-highlight-lang-c mw-content-ltr" dir="ltr"><pre><span></span><span class="w"> </span><span class="n">子程式</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="n">嗰柞陳述式</span> <span class="w"> </span><span class="n">子程式</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="n">嗰柞陳述式</span> <span class="w"> </span><span class="n">子程式</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="n">嗰柞陳述式</span> </pre></div> <p>冇子程式嘅做法有多種唔好處:個編程員喺編程嗰陣要重複將同一段碼寫幾次;如果佢想改子程式 a 入面嘅陳述式,佢就要改成三次(而用咗子程式做法嘅情況淨係需要改一次);喺現實嘅程式製作當中,一個程序閒閒地可以需要重用十次以上,所以子程式嘅使用慳咗好多時間精神。再普遍啲講,對控制流程嘅運用-結構化編程嘅諗頭-幫編程員慳咗好多時間精神<sup id="cite_ref-dijkstra1970_3-1" class="reference"><a href="#cite_note-dijkstra1970-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>。 </p> <div class="mw-heading mw-heading2"><h2 id="嗌法"><span id=".E5.97.8C.E6.B3.95"></span>嗌法</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit&section=2" title="編輯小節: 嗌法"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/%E8%8B%B1%E6%96%87" title="英文">英文</a>:<span lang="en">structured programming</span></li></ul> <div class="mw-heading mw-heading2"><h2 id="睇埋"><span id=".E7.9D.87.E5.9F.8B"></span>睇埋</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit&section=3" title="編輯小節: 睇埋"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/%E6%A8%A1%E5%A1%8A%E5%8C%96%E7%B7%A8%E7%A8%8B" title="模塊化編程">模塊化編程</a></li> <li><a href="/wiki/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%A8%8B%E5%BC%8F%E5%AE%9A%E7%90%86" title="結構化程式定理">結構化程式定理</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="引述"><span id=".E5.BC.95.E8.BF.B0"></span>引述</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&action=edit&section=4" title="編輯小節: 引述"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r2020813">.mw-parser-output .reflist{font-size:90%;margin-bottom:0.5em;list-style-type:decimal}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist reflist-columns references-column-width"> <ol class="references"> <li id="cite_note-Sethi_(1989)-1"><span class="mw-cite-backlink"><a href="#cite_ref-Sethi_(1989)_1-0">↑</a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r2190673">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free a,.mw-parser-output .citation .cs1-lock-free a{background:linear-gradient(transparent,transparent),url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited a,.mw-parser-output .id-lock-registration a,.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:linear-gradient(transparent,transparent),url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription a,.mw-parser-output .citation .cs1-lock-subscription a{background:linear-gradient(transparent,transparent),url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:linear-gradient(transparent,transparent),url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#3a3;margin-left:0.3em}.mw-parser-output .references-small,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .pin1ming4,.mw-parser-output .syu1ming4{font-style:normal}.mw-parser-output .pin1ming4>.zit3,.mw-parser-output .syu1ming4>.zit3,.mw-parser-output .zyun1ming4>.zit3,.mw-parser-output .zoek6zung6>.zit3{display:inline-block}.mw-parser-output .pin1ming4 .zit3>.zit3,.mw-parser-output .syu1ming4 .zit3>.zit3,.mw-parser-output .zyun1ming4 .zit3>.zit3,.mw-parser-output .zoek6zung6 .zit3>.zit3{display:inline-flex}.mw-parser-output .pin1ming4 .hoi1,.mw-parser-output .pin1ming4 .fan1gaak3,.mw-parser-output .pin1ming4 .saan1,.mw-parser-output .syu1ming4 .hoi1,.mw-parser-output .syu1ming4 .fan1gaak3,.mw-parser-output .syu1ming4 .saan1{display:inline-block;width:0;height:0;font-size:0.1px;color:transparent}.mw-parser-output .zyun1ming4 .fan1gaak3{font-size:0.125px}.mw-parser-output .pin1ming4+.pin1ming4,.mw-parser-output .pin1ming4+.syu1ming4,.mw-parser-output .syu1ming4+.pin1ming4,.mw-parser-output .syu1ming4+.syu1ming4,.mw-parser-output .zyun1ming4-b+.zyun1ming4-b,.mw-parser-output .zyun1ming4+.zyun1ming4{margin-left:0.0833em}.mw-parser-output .pin1ming4 .hai2tau4ge3.zit3 .hai2tau4ge3.zi6:after,.mw-parser-output .syu1ming4 .hai2tau4ge3.zit3 .hai2tau4ge3.zi6:after{clip-path:inset(0 0 0 0.05em)}.mw-parser-output .pin1ming4 .hai2zeoi3tau4ge3.hai2zeoi3mei1ge3.zit3 .hai2zeoi3tau4ge3.hai2zeoi3mei1ge3.zi6:after,.mw-parser-output .syu1ming4 .hai2zeoi3tau4ge3.hai2zeoi3mei1ge3.zit3 .hai2zeoi3tau4ge3.hai2zeoi3mei1ge3.zi6:after{clip-path:inset(0 0.14em 0 0.05em)}.mw-parser-output .pin1ming4 .hai2zeoi3mei1ge3.zit3 .hai2zeoi3mei1ge3.zi6:after,.mw-parser-output .syu1ming4 .hai2zeoi3mei1ge3.zit3 .hai2zeoi3mei1ge3.zi6:after{clip-path:inset(0 0.14em 0 0)}.mw-parser-output a[href$=".pdf"].external>span[aria-label]>.pin1ming4>.saan1,.mw-parser-output a[href$=".pdf?"].external>span[aria-label]>.pin1ming4>.saan1,.mw-parser-output a[href$=".pdf#"].external>span[aria-label]>.pin1ming4>.saan1,.mw-parser-output a[href$=".PDF"].external>span[aria-label]>.pin1ming4>.saan1,.mw-parser-output a[href$=".PDF?"].external>span[aria-label]>.pin1ming4>.saan1,.mw-parser-output a[href$=".PDF#"].external>span[aria-label]>.pin1ming4>.saan1,.mw-parser-output a[href$=".pdf"].external>span[aria-label]>.syu1ming4>.saan1,.mw-parser-output a[href$=".pdf?"].external>span[aria-label]>.syu1ming4>.saan1,.mw-parser-output a[href$=".pdf#"].external>span[aria-label]>.syu1ming4>.saan1,.mw-parser-output a[href$=".PDF"].external>span[aria-label]>.syu1ming4>.saan1,.mw-parser-output a[href$=".PDF?"].external>span[aria-label]>.syu1ming4>.saan1,.mw-parser-output a[href$=".PDF#"].external>span[aria-label]>.syu1ming4>.saan1{width:unset;font-size:unset}.mw-parser-output .zyun1ming4 .hai2tau4ge3.zit3 .hai2tau4ge3.zi6:after{overflow:hidden}.mw-parser-output .zyun1ming4 .hai2tau4ge3.hai2zeoi3mei1ge3.zit3{clip-path:inset(0 0 0 0)}.mw-parser-output .zyun1ming4 .hai2tau4ge3.hai2zeoi3mei1ge3.zit3 .hai2tau4ge3.hai2zeoi3mei1ge3.zi6:after{clip-path:inset(0.14em 0 0 0)}.mw-parser-output .zyun1ming4 .hai2zeoi3mei1ge3.zit3 .hai2zeoi3mei1ge3.zi6:after{transform:rotate(90deg)translate(-0.25em,0.5em)}.mw-parser-output .fan1gaak3+.zi6:after{clip-path:inset(0 0 0 0.1em)}.mw-parser-output .pin1ming4 .zi6:after,.mw-parser-output .syu1ming4 .zi6:after,.mw-parser-output .zyun1ming4 .zi6:after,.mw-parser-output .zoek6zung6 .zi6:after{position:absolute;align-self:baseline;margin-left:-1em}.mw-parser-output .pin1ming4 .zi6:after,.mw-parser-output .syu1ming4 .zi6:after{padding-top:1em;content:"﹋"}.mw-parser-output .zyun1ming4 .zi6:after{content:"︳";transform-origin:bottom left;transform:rotate(90deg)translate(-0.25em,0.35em)}.mw-parser-output .zoek6zung6 .zi6:after{padding-top:0.6em;content:"·";width:1em;text-align:center}.mw-parser-output .koen1zo2,.mw-parser-output .pin1ming4-b .hoi1-adj,.mw-parser-output .syu1ming4-b .hoi1-adj{margin-left:-0.4em}.mw-parser-output .koen1jau6,.mw-parser-output .pin1ming4-b .saan1-adj,.mw-parser-output .syu1ming4-b .saan1-adj{margin-right:-0.4em}.mw-parser-output .zyun1ming4-b{white-space:nowrap;border-bottom:0.05em solid currentColor}.mw-parser-output .zyun1ming4-b+link+.zyun1ming4-b,.mw-parser-output .zyun1ming4-b+.zyun1ming4-b{margin-left:0.083em}.mw-parser-output .references-small>ul{margin-left:0}.mw-parser-output .references-small>ul>li{margin-left:3em;text-indent:-3em;list-style:none}.mw-parser-output .citation .mw-selflink{font-weight:inherit}</style><cite id="CITEREFSethi1990" class="citation book cs1">Sethi, Ravi (1990) [1989]. <a rel="nofollow" class="external text" href="https://archive.org/details/programminglangu00seth"><i>Programming Languages: Concepts and Constructs</i></a>. Reading, MA: Addison-Wesley. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:%E6%9B%B8%E6%9C%AC%E4%BE%86%E6%BA%90/0-201-10365-6" title="Special:書本來源/0-201-10365-6"><bdi>0-201-10365-6</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Programming+Languages%3A+Concepts+and+Constructs&rft.place=Reading%2C+MA&rft.pub=Addison-Wesley&rft.date=1990&rft.isbn=0-201-10365-6&rft.aulast=Sethi&rft.aufirst=Ravi&rft_id=https%3A%2F%2Farchive.org%2Fdetails%2Fprogramminglangu00seth&rfr_id=info%3Asid%2Fzh-yue.wikipedia.org%3A%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B" class="Z3988"></span></span> </li> <li id="cite_note-2"><span class="mw-cite-backlink"><a href="#cite_ref-2">↑</a></span> <span class="reference-text">Wheeler, D. J. (1952). "The use of sub-routines in programmes". <i>Proceedings of the 1952 ACM national meeting (Pittsburgh) on - ACM</i> '52.</span> </li> <li id="cite_note-dijkstra1970-3"><span class="mw-cite-backlink">↑ <sup><a href="#cite_ref-dijkstra1970_3-0">3.0</a></sup> <sup><a href="#cite_ref-dijkstra1970_3-1">3.1</a></sup></span> <span class="reference-text">Dijkstra, E. W. (1970). <i>Notes on structured programming</i>.</span> </li> </ol></div> <div role="navigation" class="navbox" aria-labelledby="電腦程式編寫(大綱)" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="3"><div class="plainlinks hlist navbar mini"><ul><li class="nv-view"><a href="/wiki/Template:%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F%E7%B7%A8%E5%AF%AB" title="Template:電腦程式編寫"><abbr title="去睇呢個模" style=";;background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;">睇</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F%E7%B7%A8%E5%AF%AB" title="Template talk:電腦程式編寫"><abbr title="傾呢個模" style=";;background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;">傾</abbr></a></li><li class="nv-edit"><a class="external text" href="https://zh-yue.wikipedia.org/w/index.php?title=Template:%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F%E7%B7%A8%E5%AF%AB&action=edit"><abbr title="編輯呢個模" style=";;background:none transparent;border:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none; padding:0;">改</abbr></a></li></ul></div><div id="電腦程式編寫(大綱)" style="font-size:114%;margin:0 4em"><a href="/wiki/%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F%E7%B7%A8%E5%AF%AB" title="電腦程式編寫">電腦程式編寫</a>(<a href="/wiki/%E9%9B%BB%E8%85%A6%E7%B7%A8%E7%A8%8B%E5%98%85%E5%A4%A7%E7%B6%B1" title="電腦編程嘅大綱">大綱</a>)</div></th></tr><tr><td class="navbox-abovebelow" colspan="3"><div id="編寫電腦程式嘅工作">編寫<a href="/wiki/%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F" title="電腦程式">電腦程式</a>嘅工作</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">基本概念</th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E9%9B%BB%E8%85%A6%E7%A8%8B%E5%BC%8F" title="電腦程式">電腦程式</a>(<a href="/wiki/Hello_World" title="Hello World">哈佬呀世界</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F" title="應用程式">應用程式</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%BC%94%E7%AE%97%E6%B3%95" title="演算法">演算法</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%91%BD%E4%BB%A4_(%E9%9B%BB%E8%85%A6)" title="命令 (電腦)">命令</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E8%B3%87%E6%96%99%E9%A1%9E%E5%9E%8B" title="資料類型">資料類型</a>(<a href="/wiki/%E5%8E%9F%E5%A7%8B%E8%B3%87%E6%96%99%E9%A1%9E%E5%9E%8B" title="原始資料類型">原始資料類型</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%95%B8%E6%93%9A%E7%B5%90%E6%A7%8B" title="數據結構">數據結構</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"><a href="/wiki/%E7%A8%8B%E5%BC%8F%E5%9F%B7%E8%A1%8C" title="程式執行">程式執行</a></div></th><td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E5%9F%B7%E8%A1%8C%E6%AA%94" title="執行檔">執行檔</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%9F%B7%E8%A1%8C%E6%9C%9F" title="執行期">執行期</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E8%99%9B%E6%93%AC%E6%A9%9F" title="虛擬機">虛擬機</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Logging_(%E9%9B%BB%E8%85%A6)" title="Logging (電腦)">Logging</a></div></td></tr></tbody></table><div></div></td><td class="navbox-image" rowspan="6" style="width:1px;padding:0px 0px 0px 2px"><div><span typeof="mw:File"><a href="/wiki/File:Binario_cropped.png" class="mw-file-description"><img src="//upload.wikimedia.org/wikipedia/commons/thumb/1/17/Binario_cropped.png/150px-Binario_cropped.png" decoding="async" width="150" height="129" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/1/17/Binario_cropped.png/225px-Binario_cropped.png 1.5x, //upload.wikimedia.org/wikipedia/commons/1/17/Binario_cropped.png 2x" data-file-width="254" data-file-height="218" /></a></span></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">郁手寫<a href="/wiki/%E5%8E%9F%E5%A7%8B%E7%A2%BC" title="原始碼">碼</a></th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th id="_原始碼" scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"> <a href="/wiki/%E5%8E%9F%E5%A7%8B%E7%A2%BC" title="原始碼">原始碼</a></div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E5%8E%9F%E5%A7%8B%E7%A2%BC%E7%B7%A8%E8%BC%AF%E5%99%A8" title="原始碼編輯器">編輯器</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%A2%BC%E5%A1%8A" title="碼塊">碼塊</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%B8%AE%E6%8E%92%E9%A2%A8%E6%A0%BC" title="縮排風格">縮排</a>同<a href="/wiki/%E8%B6%8A%E4%BD%8D%E6%B3%95%E5%89%87" title="越位法則">越位法則</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%94%B9%E5%90%8D%E7%BF%92%E6%85%A3_(%E7%B7%A8%E7%A8%8B)" title="改名習慣 (編程)">改名習慣</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%8F%AF%E8%AE%80%E5%BA%A6" title="可讀度">可讀度</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E9%BA%B5%E6%A2%9D%E5%BC%8F%E7%A8%8B%E5%BC%8F%E7%A2%BC" title="麵條式程式碼">麵條式程式碼</a></div></td></tr><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E8%99%9B%E6%93%AC%E7%A2%BC" title="虛擬碼">虛擬碼</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%87%BD%E5%BC%8F%E5%BA%AB" title="函式庫">函式庫</a>(<a href="/wiki/%E6%A8%99%E6%BA%96%E5%BA%AB" title="標準庫">標準庫</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BB%A3%E7%A2%BC%E9%A2%A8%E6%A0%BC" title="代碼風格">風格</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BB%A3%E7%A2%BC%E9%87%8D%E6%A7%8B" title="代碼重構">代碼重構</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Bug" title="Bug">Bug</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%A8%8B%E5%BC%8F%E9%99%A4%E9%8C%AF" title="程式除錯">Debug</a>(<a href="/wiki/%E9%99%A4%E9%8C%AF%E5%99%A8" title="除錯器">除錯器</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%AF%AB%E7%A8%8B%E5%BC%8F%E5%B7%A5%E5%85%B7" title="寫程式工具">寫程式工具</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%B7%A8%E7%A8%8B%E5%93%A1" title="編程員">編程員</a></div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/%E7%BF%BB%E8%AD%AF%E5%99%A8_(%E9%81%8B%E7%AE%97)" title="翻譯器 (運算)">翻譯</a></th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th id="_編譯器" scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"> <a href="/wiki/%E7%B7%A8%E8%AD%AF%E5%99%A8" title="編譯器">編譯器</a></div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E7%9B%AE%E7%9A%84%E7%A2%BC" title="目的碼">目的碼</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BD%8D%E5%85%83%E7%B5%84%E7%A2%BC" title="位元組碼">位元組碼</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%A9%9F%E6%A2%B0%E7%A2%BC" class="mw-redirect" title="機械碼">機械碼</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%B7%A8%E8%AD%AF%E6%9C%9F" title="編譯期">編譯期</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%8D%B3%E6%99%82%E7%B7%A8%E8%AD%AF" title="即時編譯">即時編譯</a>、<a href="/wiki/%E6%8F%90%E5%89%8D%E7%B7%A8%E8%AD%AF" title="提前編譯">提前編譯</a>同<a href="/wiki/%E5%8B%95%E6%85%8B%E9%87%8D%E7%B7%A8%E8%AD%AF" title="動態重編譯">動態重編譯</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%8F%8D%E7%B7%A8%E8%AD%AF%E5%99%A8" title="反編譯器">反編譯器</a></div></td></tr><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E4%B8%AD%E9%96%93%E8%A1%A8%E7%A4%BA" title="中間表示">中間表示</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%BA%90%E7%A2%BC%E5%88%B0%E6%BA%90%E7%A2%BC%E7%BF%BB%E8%AD%AF%E5%99%A8" title="源碼到源碼翻譯器">源碼到源碼翻譯器</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%9C%80%E4%BD%B3%E5%8C%96%E7%B7%A8%E8%AD%AF%E5%99%A8" title="最佳化編譯器">最佳化編譯器</a></div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80" title="程式語言">程式語言</a><br />(<a href="/wiki/%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80%E7%90%86%E8%AB%96" title="程式語言理論">理論</a>)</th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-odd" style="width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;">相關概念</div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E9%99%B3%E8%BF%B0%E5%BC%8F_(%E9%9B%BB%E8%85%A6%E7%A7%91%E5%AD%B8)" title="陳述式 (電腦科學)">陳述式</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%8F%A5%E6%B3%95_(%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80)" title="句法 (程式語言)">句法</a>同<a href="/wiki/%E8%AA%9E%E7%BE%A9_(%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80)" title="語義 (程式語言)">語義</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%AE%97%E5%AD%90_(%E7%B7%A8%E7%A8%8B)" title="算子 (編程)">算子</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%A8%8B%E5%BC%8F%E6%B3%A8%E9%87%8B" title="程式注釋">注釋</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%8C%87%E6%A8%99_(%E9%9B%BB%E8%85%A6%E7%A7%91%E5%AD%B8)" title="指標 (電腦科學)">指標</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BD%8E%E7%B4%9A%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80" title="低級程式語言">低級語言</a>(<a href="/wiki/%E6%A9%9F%E6%A2%B0%E8%AA%9E%E8%A8%80" title="機械語言">機械</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%B5%84%E5%90%88%E8%AA%9E%E8%A8%80" title="組合語言">組合語言</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%89%8B%E7%A8%BF%E8%AA%9E%E8%A8%80" title="手稿語言">手稿語言</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"><a href="/wiki/%E9%AB%98%E7%B4%9A%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80" title="高級程式語言">高級語言</a></div></th><td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/C_(%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80)" title="C (程式語言)">C</a>、<a href="/wiki/C%2B%2B" title="C++">C++</a> 同 <a href="/wiki/C%E2%99%AF" title="C♯">C♯</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Python" title="Python">Python</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/PHP" title="PHP">PHP</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Java_(%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80)" title="Java (程式語言)">Java</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Julia" title="Julia">Julia</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/MATLAB" title="MATLAB">MATLAB</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"><a href="/wiki/%E8%AE%8A%E6%95%B8_(%E7%B7%A8%E7%A8%8B)" title="變數 (編程)">變數</a></div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E5%B1%80%E9%83%A8%E8%AE%8A%E6%95%B8" title="局部變數">局部</a>同<a href="/wiki/%E5%85%A8%E5%B1%80%E8%AE%8A%E6%95%B8" title="全局變數">全局</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%A8%8B%E5%BC%8F%E5%8F%83%E6%95%B8" title="程式參數">參數</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%B8%B8%E6%95%B8_(%E7%B7%A8%E7%A8%8B)" title="常數 (編程)">常數</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%91%BD%E5%90%8D%E7%A9%BA%E9%96%93" title="命名空間">命名空間</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%88%9D%E5%A7%8B%E5%8C%96" title="初始化">初始化</a>同<a href="/wiki/%E6%9C%80%E7%B5%82%E5%8C%96" title="最終化">最終化</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"><a href="/wiki/%E6%8E%A7%E5%88%B6%E6%B5%81%E7%A8%8B" title="控制流程">控制流程</a></div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><td colspan="2" class="navbox-list navbox-even" style="width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/Goto" title="Goto">Goto</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%AD%90%E7%A8%8B%E5%BC%8F" title="子程式">子程式</a>(<a href="/wiki/%E9%81%9E%E6%AD%B8_(%E9%9B%BB%E8%85%A6%E7%A7%91%E5%AD%B8)" title="遞歸 (電腦科學)">遞歸</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%A2%9D%E4%BB%B6%E9%99%B3%E8%BF%B0%E5%BC%8F" title="條件陳述式">條件</a>同<a href="/wiki/%E9%96%8B%E9%96%82%E9%99%B3%E8%BF%B0%E5%BC%8F" title="開閂陳述式">開閂</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BE%8B%E5%A4%96%E8%99%95%E7%90%86" title="例外處理">例外處理</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E5%8D%94%E7%A8%8B" title="協程">協程</a>(<a href="/wiki/%E5%AD%90%E7%A8%8B%E5%BC%8F" title="子程式">子程式</a>)</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"><a href="/wiki/%E8%BF%B4%E5%9C%88" title="迴圈">迴圈</a></div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/For_%E8%BF%B4%E5%9C%88" title="For 迴圈">For</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/While_%E8%BF%B4%E5%9C%88" title="While 迴圈">While</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Do-while_%E8%BF%B4%E5%9C%88" title="Do-while 迴圈">Do-while</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Foreach_%E8%BF%B4%E5%9C%88" title="Foreach 迴圈">Foreach</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E8%BF%B4%E5%9C%88%E8%AE%8A%E9%87%8F" title="迴圈變量">變量</a>同<a href="/wiki/%E8%BF%B4%E5%9C%88%E4%B8%8D%E8%AE%8A%E9%87%8F" title="迴圈不變量">不變量</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%84%A1%E9%99%90%E8%BF%B4%E5%9C%88" title="無限迴圈">無限</a></div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/%E7%A8%8B%E5%BC%8F%E7%B7%A8%E5%AF%AB%E7%AF%84%E5%BC%8F" title="程式編寫範式">編程範式</a></th><td class="navbox-list navbox-even hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E5%AE%A3%E5%91%8A%E5%BC%8F%E7%B7%A8%E7%A8%8B" title="宣告式編程">宣告式</a>(<a href="/wiki/%E5%87%BD%E6%95%B8%E7%B7%A8%E7%A8%8B" class="mw-redirect" title="函數編程">函數</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E9%82%8F%E8%BC%AF%E7%B7%A8%E7%A8%8B" title="邏輯編程">邏輯</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%B4%84%E6%9D%9F%E7%A8%8B%E5%BC%8F" title="約束程式">約束</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%95%B8%E6%93%9A%E6%B5%81%E7%A8%8B%E5%BC%8F" title="數據流程式">數據流</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%8C%87%E4%BB%A4%E5%BC%8F%E7%B7%A8%E7%A8%8B" title="指令式編程">指令式</a>(<a href="/wiki/%E7%A8%8B%E5%BA%8F%E5%BC%8F%E7%B7%A8%E7%A8%8B" title="程序式編程">程序式</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E7%89%A9%E4%BB%B6%E5%B0%8E%E5%90%91%E7%B7%A8%E7%A8%8B" title="物件導向編程">物件導向式</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a class="mw-selflink selflink">結構化</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BA%8B%E4%BB%B6%E9%A9%85%E5%8B%95%E7%B7%A8%E7%A8%8B" title="事件驅動編程">事件驅動式</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">相關領域</th><td class="navbox-list navbox-odd hlist" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;"><a href="/wiki/%E9%9B%BB%E8%85%A6%E7%A7%91%E5%AD%B8" title="電腦科學">電腦科學</a></div></th><td class="navbox-list navbox-odd" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E7%90%86%E8%AB%96%E9%9B%BB%E8%85%A6%E7%A7%91%E5%AD%B8" title="理論電腦科學">理論電腦科學</a>(<a href="/wiki/%E9%81%8B%E7%AE%97%E7%90%86%E8%AB%96" title="運算理論">運算理論</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E8%BB%9F%E4%BB%B6%E5%B7%A5%E7%A8%8B" title="軟件工程">軟件工程</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E9%81%8A%E6%88%B2%E7%B7%A8%E7%A8%8B" title="遊戲編程">遊戲編程</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD" title="人工智能">人工智能</a></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%;padding-left:0em;padding-right:0em;"><div style="padding:0em 0.75em;">拉雜領域</div></th><td class="navbox-list navbox-even" style="text-align:left;border-left-width:2px;border-left-style:solid;width:100%;padding:0px"><div style="padding:0em 0.25em"><a href="/wiki/%E9%82%8F%E8%BC%AF%E5%AD%B8" class="mw-redirect" title="邏輯學">邏輯學</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%95%B8%E5%AD%B8" title="數學">數學</a>(<a href="/wiki/%E6%87%89%E7%94%A8%E6%95%B8%E5%AD%B8" title="應用數學">應用</a>同<a href="/wiki/%E9%9B%A2%E6%95%A3%E6%95%B8%E5%AD%B8" title="離散數學">離散</a>數學)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E8%AA%8D%E7%9F%A5%E7%A7%91%E5%AD%B8" title="認知科學">認知科學</a>(<a href="/wiki/%E8%AA%9E%E8%A8%80%E5%AD%B8" title="語言學">語言學</a>)<span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/%E6%95%B8%E7%A2%BC%E8%97%9D%E8%A1%93" title="數碼藝術">數碼藝術</a>同<a href="/wiki/%E6%BC%94%E7%AE%97%E6%B3%95%E8%97%9D%E8%A1%93" title="演算法藝術">演算法藝術</a></div></td></tr></tbody></table><div></div></td></tr><tr><td class="navbox-abovebelow" colspan="3"><div><a href="/wiki/%E7%B7%A8%E7%A8%8B%E9%81%8A%E6%88%B2" title="編程遊戲">編程遊戲</a><span style="white-space:nowrap; font-weight:bold;"> ·</span> <a href="/wiki/Category:%E7%B7%A8%E7%A8%8B" title="Category:編程">編程類</a></div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐api‐int.codfw.main‐849f99967d‐qfjgc Cached time: 20241124045642 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.334 seconds Real time usage: 0.399 seconds Preprocessor visited node count: 2988/1000000 Post‐expand include size: 103509/2097152 bytes Template argument size: 12703/2097152 bytes Highest expansion depth: 17/100 Expensive parser function count: 2/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 10916/5000000 bytes Lua time usage: 0.215/10.000 seconds Lua memory usage: 17269853/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 352.612 1 -total 43.43% 153.157 1 Template:Reflist 36.08% 127.227 1 Template:Cite_book 29.68% 104.665 1 Template:Lang-en 26.25% 92.558 8 Template:Navbox 14.21% 50.093 1 Template:程式執行 13.84% 48.788 7 Template:Navbox_subgroup 7.03% 24.790 1 Template:Jpingauto 5.23% 18.445 2 Template:Str_find 3.53% 12.452 1 Template:See_also --> <!-- Saved in parser cache with key zh_yuewiki:pcache:idhash:207008-0!canonical and timestamp 20241124045642 and revision id 2155062. Rendering was triggered because: api-parse --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">由「<a dir="ltr" href="https://zh-yue.wikipedia.org/w/index.php?title=結構化編程&oldid=2155062">https://zh-yue.wikipedia.org/w/index.php?title=結構化編程&oldid=2155062</a>」收</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:%E5%88%86%E9%A1%9E" title="Special:分類">屬於2類</a>:<ul><li><a href="/wiki/Category:%E7%B7%A8%E7%A8%8B" title="Category:編程">編程</a></li><li><a href="/wiki/Category:%E7%B7%A8%E7%A8%8B%E7%AF%84%E5%BC%8F" title="Category:編程範式">編程範式</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">屬於3隱類:<ul><li><a href="/wiki/Category:Pages_using_deprecated_source_tags" title="Category:Pages using deprecated source tags">Pages using deprecated source tags</a></li><li><a href="/wiki/Category:%E6%A8%A1%E7%94%A8%E9%87%8D%E8%A4%87%E5%8F%83%E6%95%B8%E5%98%85%E7%89%88%E9%9D%A2" title="Category:模用重複參數嘅版面">模用重複參數嘅版面</a></li><li><a href="/wiki/Category:%E6%9C%89%E8%8B%B1%E6%96%87%E5%98%85%E6%96%87%E7%AB%A0" title="Category:有英文嘅文章">有英文嘅文章</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> 呢版上次改係2024年7月9號 (禮拜二) 07:16 嘅事。</li> <li id="footer-info-copyright">呢度嘅所有文字係根據<a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 牌照 4.0</a>嘅條款發佈;可能會有附加嘅條款。 利用呢個網站,你同意<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">利用條款</a>同埋<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">私隱政策</a>。Wikipedia® 係<a rel="nofollow" class="external text" href="https://www.wikimediafoundation.org/">Wikimedia Foundation, Inc.</a> 嘅註冊商標,一個非牟利機構。</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">私隱政策</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:%E9%97%9C%E6%96%BC">關於維基百科</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:%E4%B8%80%E8%88%AC%E5%85%8D%E8%B2%AC%E8%81%B2%E6%98%8E">免責聲明</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">行為準則</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">開發人員</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/zh-yue.wikipedia.org">統計</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie聲明</a></li> <li id="footer-places-mobileview"><a href="//zh-yue.m.wikipedia.org/w/index.php?title=%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">手提版</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-rf9q5","wgBackendResponseTime":161,"wgPageParseReport":{"limitreport":{"cputime":"0.334","walltime":"0.399","ppvisitednodes":{"value":2988,"limit":1000000},"postexpandincludesize":{"value":103509,"limit":2097152},"templateargumentsize":{"value":12703,"limit":2097152},"expansiondepth":{"value":17,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":10916,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 352.612 1 -total"," 43.43% 153.157 1 Template:Reflist"," 36.08% 127.227 1 Template:Cite_book"," 29.68% 104.665 1 Template:Lang-en"," 26.25% 92.558 8 Template:Navbox"," 14.21% 50.093 1 Template:程式執行"," 13.84% 48.788 7 Template:Navbox_subgroup"," 7.03% 24.790 1 Template:Jpingauto"," 5.23% 18.445 2 Template:Str_find"," 3.53% 12.452 1 Template:See_also"]},"scribunto":{"limitreport-timeusage":{"value":"0.215","limit":"10.000"},"limitreport-memusage":{"value":17269853,"limit":52428800}},"cachereport":{"origin":"mw-api-int.codfw.main-849f99967d-qfjgc","timestamp":"20241124045642","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"\u7d50\u69cb\u5316\u7de8\u7a0b","url":"https:\/\/zh-yue.wikipedia.org\/wiki\/%E7%B5%90%E6%A7%8B%E5%8C%96%E7%B7%A8%E7%A8%8B","sameAs":"http:\/\/www.wikidata.org\/entity\/Q223335","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q223335","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2019-09-02T08:00:41Z","dateModified":"2024-07-09T07:16:06Z"}</script> </body> </html>