{"id":6557,"date":"2024-06-06T11:02:57","date_gmt":"2024-06-06T11:02:57","guid":{"rendered":"http:\/\/the-codest.localhost\/dictionary\/control-flow\/"},"modified":"2024-06-06T11:02:57","modified_gmt":"2024-06-06T11:02:57","slug":"styriflaedi","status":"publish","type":"dictionary","link":"https:\/\/thecodest.co\/is\/dictionary\/control-flow\/","title":{"rendered":"St\u00fdrifl\u00e6\u00f0i"},"content":{"rendered":"<h1>St\u00fdrifl\u00e6\u00f0i<\/h1>\n<p>St\u00fdrifl\u00e6\u00f0i v\u00edsar til r\u00f6\u00f0unarinnar sem skipanir e\u00f0a yfirl\u00fdsingar eru framkv\u00e6mdar \u00ed innan forrits. \u00dea\u00f0 \u00e1kvar\u00f0ar hva\u00f0a braut forriti\u00f0 fer eftir \u00e1kve\u00f0num skilyr\u00f0um e\u00f0a atbur\u00f0um. St\u00fdrifl\u00e6\u00f0i er grundvallaratri\u00f0i \u00ed forritun \u00fear sem \u00fea\u00f0 gerir forriturum kleift a\u00f0 b\u00faa til fl\u00f3kna r\u00f6kfr\u00e6\u00f0i og reiknirit sem geta sinnt tilteknum verkefnum.<\/p>\n<p>Stj\u00f3rnfl\u00e6\u00f0i m\u00e1 flokka \u00ed tvo meginflokka: skilyrt og endurtekningar. Skilyrt stj\u00f3rnfl\u00e6\u00f0i felur \u00ed s\u00e9r a\u00f0 taka \u00e1kvar\u00f0anir bygg\u00f0ar \u00e1 \u00e1kve\u00f0num skilyr\u00f0um. Til d\u00e6mis, ef \u00e1kve\u00f0i\u00f0 skilyr\u00f0i er satt, keyrir forriti\u00f0 \u00e1kve\u00f0inn safn fyrirm\u00e6la, annars keyrir \u00fea\u00f0 anna\u00f0 safn fyrirm\u00e6la. Skilyrt stj\u00f3rnfl\u00e6\u00f0i er framkv\u00e6mt me\u00f0 skilyrtum st\u00f6\u00f0uh\u00e6tti, svo sem if-else-st\u00f6\u00f0uh\u00e6tti, switch-st\u00f6\u00f0uh\u00e6tti og \u00fer\u00edeykua\u00f0ger\u00f0um.<\/p>\n<p>Endurtekningarst\u00fdring, aftur \u00e1 m\u00f3ti, felur \u00ed s\u00e9r a\u00f0 keyrt er \u00e1kve\u00f0i\u00f0 safn fyrirm\u00e6la endurteki\u00f0 \u00fear til \u00e1kve\u00f0in skilyr\u00f0i eru uppfyllt. \u00deetta er gert me\u00f0 \u00fev\u00ed a\u00f0 nota lykkjur eins og for-lykkjur, while-lykkjur og do-while-lykkjur. Endurtekningarst\u00fdring er s\u00e9rstaklega gagnleg \u00feegar unni\u00f0 er me\u00f0 st\u00f3r gagna\u00f6fl <a href=\"https:\/\/thecodest.co\/is\/blog\/app-data-collection-security-risks-value-and-types-explored\/\">g\u00f6gn<\/a> e\u00f0a \u00feegar unni\u00f0 er \u00ed endurteknum verkefnum.<\/p>\n<p>Stj\u00f3rnfl\u00e6\u00f0i er einnig undir \u00e1hrifum hugtaksins gildissvi\u00f0s, sem v\u00edsar til a\u00f0gengis breyta og fallanna innan forrits. Gildissvi\u00f0 breytu e\u00f0a falls \u00e1kvar\u00f0ar hvar h\u00e6gt er a\u00f0 n\u00e1lgast og breyta \u00fev\u00ed innan forrits. A\u00f0 skilja gildissvi\u00f0 er nau\u00f0synlegt til a\u00f0 b\u00faa til skilvirkar og \u00e1rangursr\u00edkar stj\u00f3rnfl\u00e6\u00f0isskipulagningar.<\/p>\n<p>Almennt er st\u00fdrifl\u00e6\u00f0i grundvallarhugtak \u00ed forritun sem gerir forriturum kleift a\u00f0 b\u00faa til fl\u00f3kin og d\u00fdnam\u00edsk forrit. Me\u00f0 \u00fev\u00ed a\u00f0 skilja mismunandi ger\u00f0ir st\u00fdrifl\u00e6\u00f0is og hvernig \u00fe\u00e6r hafa samskipti vi\u00f0 gildissvi\u00f0 geta forritarar b\u00fai\u00f0 til skilvirk og \u00e1rangursr\u00edk <a href=\"https:\/\/thecodest.co\/is\/dictionary\/what-is-code-refactoring\/\">k\u00f3\u00f0i<\/a> sem framkv\u00e6mir tiltekin verkefni me\u00f0 n\u00e1kv\u00e6mni og r\u00e9ttl\u00e6tni.<\/p>","protected":false},"excerpt":{"rendered":"<p>L\u00e6r\u00f0u hvernig \u00e1 a\u00f0 b\u00faa til fl\u00f3kna r\u00f6kfr\u00e6\u00f0i og reiknirit me\u00f0 st\u00fdrifl\u00e6\u00f0i \u00ed forritun. Kynntu \u00fe\u00e9r skilyrt og endurtekningarst\u00fdrt fl\u00e6\u00f0i og hugtaki\u00f0 gildissvi\u00f0.<\/p>","protected":false},"template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-6557","dictionary","type-dictionary","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Control Flow - The Codest<\/title>\n<meta name=\"description\" content=\"Learn how to create complex logic and algorithms with control flow in programming. Discover conditional and iterative control flow and the concept of scope.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/thecodest.co\/is\/ordabok\/styriflaedi\/\" \/>\n<meta property=\"og:locale\" content=\"is_IS\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Control Flow\" \/>\n<meta property=\"og:description\" content=\"Learn how to create complex logic and algorithms with control flow in programming. Discover conditional and iterative control flow and the concept of scope.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/thecodest.co\/is\/ordabok\/styriflaedi\/\" \/>\n<meta property=\"og:site_name\" content=\"The Codest\" \/>\n<meta property=\"og:image\" content=\"https:\/\/thecodest.co\/app\/uploads\/2024\/06\/cover-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/dictionary\\\/control-flow\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/dictionary\\\/control-flow\\\/\",\"name\":\"Control Flow - The Codest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\"},\"datePublished\":\"2024-06-06T11:02:57+00:00\",\"description\":\"Learn how to create complex logic and algorithms with control flow in programming. Discover conditional and iterative control flow and the concept of scope.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/dictionary\\\/control-flow\\\/#breadcrumb\"},\"inLanguage\":\"is\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/thecodest.co\\\/dictionary\\\/control-flow\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/dictionary\\\/control-flow\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/thecodest.co\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dictionary\",\"item\":\"https:\\\/\\\/thecodest.co\\\/sv\\\/ordbok\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Control Flow\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#website\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"name\":\"The Codest\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/thecodest.co\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"is\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#organization\",\"name\":\"The Codest\",\"url\":\"https:\\\/\\\/thecodest.co\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"is\",\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"contentUrl\":\"https:\\\/\\\/thecodest.co\\\/app\\\/uploads\\\/2024\\\/03\\\/thecodest-logo.svg\",\"width\":144,\"height\":36,\"caption\":\"The Codest\"},\"image\":{\"@id\":\"https:\\\/\\\/thecodest.co\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/pl.linkedin.com\\\/company\\\/codest\",\"https:\\\/\\\/clutch.co\\\/profile\\\/codest\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"St\u00fdrifl\u00e6\u00f0i - The Codest","description":"L\u00e6r\u00f0u hvernig \u00e1 a\u00f0 b\u00faa til fl\u00f3kna r\u00f6kfr\u00e6\u00f0i og reiknirit me\u00f0 st\u00fdrifl\u00e6\u00f0i \u00ed forritun. Kynntu \u00fe\u00e9r skilyrt og endurtekningarst\u00fdrt fl\u00e6\u00f0i og hugtaki\u00f0 gildissvi\u00f0.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/thecodest.co\/is\/ordabok\/styriflaedi\/","og_locale":"is_IS","og_type":"article","og_title":"Control Flow","og_description":"Learn how to create complex logic and algorithms with control flow in programming. Discover conditional and iterative control flow and the concept of scope.","og_url":"https:\/\/thecodest.co\/is\/ordabok\/styriflaedi\/","og_site_name":"The Codest","og_image":[{"width":1200,"height":675,"url":"https:\/\/thecodest.co\/app\/uploads\/2024\/06\/cover-image.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/thecodest.co\/dictionary\/control-flow\/","url":"https:\/\/thecodest.co\/dictionary\/control-flow\/","name":"St\u00fdrifl\u00e6\u00f0i - The Codest","isPartOf":{"@id":"https:\/\/thecodest.co\/#website"},"datePublished":"2024-06-06T11:02:57+00:00","description":"L\u00e6r\u00f0u hvernig \u00e1 a\u00f0 b\u00faa til fl\u00f3kna r\u00f6kfr\u00e6\u00f0i og reiknirit me\u00f0 st\u00fdrifl\u00e6\u00f0i \u00ed forritun. Kynntu \u00fe\u00e9r skilyrt og endurtekningarst\u00fdrt fl\u00e6\u00f0i og hugtaki\u00f0 gildissvi\u00f0.","breadcrumb":{"@id":"https:\/\/thecodest.co\/dictionary\/control-flow\/#breadcrumb"},"inLanguage":"is","potentialAction":[{"@type":"ReadAction","target":["https:\/\/thecodest.co\/dictionary\/control-flow\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/thecodest.co\/dictionary\/control-flow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/thecodest.co\/"},{"@type":"ListItem","position":2,"name":"Dictionary","item":"https:\/\/thecodest.co\/sv\/ordbok\/"},{"@type":"ListItem","position":3,"name":"Control Flow"}]},{"@type":"WebSite","@id":"https:\/\/thecodest.co\/#website","url":"https:\/\/thecodest.co\/","name":"The Codest","description":"","publisher":{"@id":"https:\/\/thecodest.co\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/thecodest.co\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"is"},{"@type":"Organization","@id":"https:\/\/thecodest.co\/#organization","name":"The Codest","url":"https:\/\/thecodest.co\/","logo":{"@type":"ImageObject","inLanguage":"is","@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/","url":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","contentUrl":"https:\/\/thecodest.co\/app\/uploads\/2024\/03\/thecodest-logo.svg","width":144,"height":36,"caption":"The Codest"},"image":{"@id":"https:\/\/thecodest.co\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/pl.linkedin.com\/company\/codest","https:\/\/clutch.co\/profile\/codest"]}]}},"_links":{"self":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/dictionary\/6557","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/dictionary"}],"about":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/types\/dictionary"}],"version-history":[{"count":0,"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/dictionary\/6557\/revisions"}],"wp:attachment":[{"href":"https:\/\/thecodest.co\/is\/wp-json\/wp\/v2\/media?parent=6557"}],"curies":[{"name":"vp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}