{"id":1194,"date":"2022-08-24T20:04:41","date_gmt":"2022-08-24T14:34:41","guid":{"rendered":"https:\/\/mutesoft.com\/spaces\/software\/?p=1194"},"modified":"2022-08-25T20:25:15","modified_gmt":"2022-08-25T14:55:15","slug":"difference-between-argument-and-parameter","status":"publish","type":"post","link":"https:\/\/mutesoft.com\/spaces\/software\/difference-between-argument-and-parameter.html","title":{"rendered":"Difference between Argument and Parameter"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-1024x512.jpg\" alt=\"Programming Languages\" class=\"wp-image-1203\" srcset=\"https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-1024x512.jpg 1024w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-300x150.jpg 300w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-768x384.jpg 768w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-1536x768.jpg 1536w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-2048x1024.jpg 2048w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-500x250.jpg 500w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-800x400.jpg 800w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-1280x640.jpg 1280w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2022\/08\/programming-general-1920x960.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Programming Languages<\/figcaption><\/figure>\n\n\n\n<p>Programmers use the terms argument and parameter interchangeably. When someone says argument or parameter, they mean the same thing. However, there is a difference.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Parameter_Vs_Argument\"><\/span>Parameter Vs. Argument<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column has-pale-cyan-blue-background-color has-background is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<h4 class=\"has-text-align-center wp-block-heading\"><span class=\"ez-toc-section\" id=\"Parameter\"><\/span>Parameter<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>Named variables declared in the function definition<\/li><li>Part of the function\/method signature<\/li><li>In some programming languages, parameters are also called <em>formal arguments<\/em><\/li><\/ol>\n<\/div>\n\n\n\n<div class=\"wp-block-column has-light-green-cyan-background-color has-background is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:50%\">\n<h4 class=\"has-text-align-center wp-block-heading\"><span class=\"ez-toc-section\" id=\"Argument\"><\/span>Argument<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<ol class=\"wp-block-list\"><li>Variables or values passed to the function when called<\/li><li>The actual value supplied to the function at runtime<\/li><li>In some programming languages, arguments are also called <em>actual arguments<\/em><\/li><\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n\n\n\n<p><strong>Parameters<\/strong> are named variables declared in the function definition.<\/p>\n\n\n\n<p><strong>Arguments<\/strong> are variables or values passed to the function when calling it. <\/p>\n\n\n\n<p>This definition is universal, irrespective of programming language. Let us consider the following Python function:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">def multiply(x, y):\n  return x * y;\n\nmultiply(10, 15);<\/pre>\n\n\n\n<p>In the above example, the function <code>multiple()<\/code> expects two <strong>parameters<\/strong>:<code> x and y<\/code>. Next, when the function <code>multiply()<\/code> is called, two <strong>arguments<\/strong> are passed to the function: <code>10 and 15<\/code>. Therefore, arguments are runtime values that fill the function parameters.<\/p>\n\n\n\n<style>\n#ez-toc-container{display:none}\n<\/style>\n","protected":false},"excerpt":{"rendered":"<p>Programmers use the terms argument and parameter interchangeably. When someone says argument or parameter, they mean the same thing. However, there is a difference.<\/p>\n","protected":false},"author":2,"featured_media":1203,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"none","_seopress_titles_title":"","_seopress_titles_desc":"Programmers use the terms argument and parameter interchangeably. When someone says argument or parameter, they mean the same thing. However, there is a difference.","_seopress_robots_index":"","_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"categories":[6],"tags":[62,61],"class_list":["post-1194","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-coding","tag-programming-concepts"],"_links":{"self":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts\/1194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/comments?post=1194"}],"version-history":[{"count":13,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts\/1194\/revisions"}],"predecessor-version":[{"id":1236,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts\/1194\/revisions\/1236"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/media\/1203"}],"wp:attachment":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/media?parent=1194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/categories?post=1194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/tags?post=1194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}