{"id":3243,"date":"2026-11-10T08:04:17","date_gmt":"2026-11-10T08:04:17","guid":{"rendered":"https:\/\/wiki.designcorner.co.ke\/?dc_term=subroutine"},"modified":"2026-11-10T08:04:17","modified_gmt":"2026-11-10T08:04:17","slug":"subroutine","status":"publish","type":"dc_term","link":"https:\/\/wiki.designcorner.co.ke\/?dc_term=subroutine","title":{"rendered":"Subroutine"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">What it is<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A subroutine, also called a function, is a named block of code that does one task. Instead of writing the same instructions many times, a programmer writes them once as a subroutine or function and calls it when needed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why it matters for your business<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">It keeps code shorter and makes fixes simpler.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Real-world example<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A function that calculates VAT is used on every invoice.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Design Corner tip<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ask developers to reuse functions, which means one fix updates everywhere.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>A named block of code that does one task and can be used repeatedly.<\/p>\n","protected":false},"featured_media":0,"template":"","dc_letter":[24],"dc_topic":[59,34],"class_list":["post-3243","dc_term","type-dc_term","status-publish","hentry","dc_letter-s","dc_topic-programming","dc_topic-software-and-development"],"_links":{"self":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/3243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term"}],"about":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/types\/dc_term"}],"version-history":[{"count":0,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=\/wp\/v2\/dc_term\/3243\/revisions"}],"wp:attachment":[{"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3243"}],"wp:term":[{"taxonomy":"dc_letter","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_letter&post=3243"},{"taxonomy":"dc_topic","embeddable":true,"href":"https:\/\/wiki.designcorner.co.ke\/index.php?rest_route=%2Fwp%2Fv2%2Fdc_topic&post=3243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}