{"id":3781,"date":"2025-04-21T09:41:38","date_gmt":"2025-04-21T09:41:38","guid":{"rendered":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?page_id=3781"},"modified":"2025-05-08T09:37:21","modified_gmt":"2025-05-08T09:37:21","slug":"namevalue-pairs-in-hash-functions","status":"publish","type":"page","link":"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/","title":{"rendered":"Name:Value Pairs in hash functions"},"content":{"rendered":"\n<p>Hash functions generally &#8220;take&#8221; arguments. For example in<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#<a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/glossary-of-terms\/#o5243\">HMI<\/a> <a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/setcursorryrow-cxcol-hash-function\/\">SetCursor<\/a>(4, 5)<\/pre>\n\n\n\n<p>4 and 5 are the arguments to the&nbsp;<code>SetCursor<\/code>&nbsp;hash function (they specify the row and column respectively). If the arguments are specified that way, they must be in precisely the right order, separated by commas. If any optional arguments are omitted they must still appear as commas.<\/p>\n\n\n\n<p>Name:Value Pairs (NVP) give you a simpler, less tedious way of specifying arguments, especially in hash functions that take a lot of arguments. NVP arguments also improve the readability of your program.<\/p>\n\n\n\n<p>Example: The line above, re-written with NVP arguments, would be<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetCursor(r:4, c:5)<\/pre>\n\n\n\n<p>It would be equally permissible to reverse the arguments (something you absolutely cannot do with the old list format!):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetCursor(c:5, r:4)<\/pre>\n\n\n\n<p>The abbreviated names for the arguments,&nbsp;<code>c<\/code>&nbsp;for column and&nbsp;<code>r<\/code>&nbsp;for row, are defined in the hash function definition. The names are always very short, to save typing, and may be UPPER or lower case.<\/p>\n\n\n\n<p>In the pages for each hash function, the Names are defined in the page title. If you use NVP, you can list the arguments in any order. If you don&#8217;t use NVP, you must list them in the order given. Hence,<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetCursor(r:4, c:5)<\/pre>\n\n\n\n<p>and<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetCursor(c:5, r:4)<\/pre>\n\n\n\n<p>are equivalent, but<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetCursor(4, 5)<\/pre>\n\n\n\n<p>and<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#HMI SetCursor(5, 4)<\/pre>\n\n\n\n<p>are not.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\">Alternative names<\/h6>\n\n\n\n<p>Some arguments can have different names. This most often happens with screen coordinates, where you may chose to call them&nbsp;<code>r<\/code>&nbsp;and&nbsp;<code>c<\/code>, or you may prefer&nbsp;<code>y<\/code>&nbsp;and&nbsp;<code>x<\/code>. Alternative names are shown with a vertical bar (pipe symbol between the alternatives).<\/p>\n\n\n\n<p>See for example the heading for&nbsp;<code><a href=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/knowledgebase\/deprecated\/hmi-android-windows\/setcursorryrow-cxcol-hash-function\/\">SetCursor<\/a><\/code>. &#8220;# SetCursor(r|y:Row, c|x:Col) hash function&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hash functions generally &#8220;take&#8221; arguments. For example in #HMI SetCursor(4, 5) 4 and 5 are the arguments to the&nbsp;SetCursor&nbsp;hash function (they specify the row and&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"page-templates\/template-knowledge-landing.php","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-3781","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Name:Value Pairs in hash functions - SPLat Controls<\/title>\n<meta name=\"robots\" content=\"noindex, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Name:Value Pairs in hash functions - SPLat Controls\" \/>\n<meta property=\"og:description\" content=\"Hash functions generally &#8220;take&#8221; arguments. For example in #HMI SetCursor(4, 5) 4 and 5 are the arguments to the&nbsp;SetCursor&nbsp;hash function (they specify the row and...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/\" \/>\n<meta property=\"og:site_name\" content=\"SPLat Controls\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-08T09:37:21+00:00\" \/>\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:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/\",\"name\":\"Name:Value Pairs in hash functions - SPLat Controls\",\"isPartOf\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\"},\"datePublished\":\"2025-04-21T09:41:38+00:00\",\"dateModified\":\"2025-05-08T09:37:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Name:Value Pairs in hash functions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"name\":\"SPLat Controls\",\"description\":\"OEM Embedded Machine Controllers\",\"publisher\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization\",\"name\":\"SPLat Controls\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"contentUrl\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg\",\"caption\":\"SPLat Controls\"},\"image\":{\"@id\":\"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Name:Value Pairs in hash functions - SPLat Controls","robots":{"index":"noindex","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"og_locale":"en_US","og_type":"article","og_title":"Name:Value Pairs in hash functions - SPLat Controls","og_description":"Hash functions generally &#8220;take&#8221; arguments. For example in #HMI SetCursor(4, 5) 4 and 5 are the arguments to the&nbsp;SetCursor&nbsp;hash function (they specify the row and...","og_url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/","og_site_name":"SPLat Controls","article_modified_time":"2025-05-08T09:37:21+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/","name":"Name:Value Pairs in hash functions - SPLat Controls","isPartOf":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website"},"datePublished":"2025-04-21T09:41:38+00:00","dateModified":"2025-05-08T09:37:21+00:00","breadcrumb":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/namevalue-pairs-in-hash-functions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webprojects.cloud\/wordpress\/splatco\/"},{"@type":"ListItem","position":2,"name":"Name:Value Pairs in hash functions"}]},{"@type":"WebSite","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#website","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","name":"SPLat Controls","description":"OEM Embedded Machine Controllers","publisher":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webprojects.cloud\/wordpress\/splatco\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#organization","name":"SPLat Controls","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/","url":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","contentUrl":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-content\/uploads\/2024\/10\/logo.svg","caption":"SPLat Controls"},"image":{"@id":"https:\/\/webprojects.cloud\/wordpress\/splatco\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/pages\/3781","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/comments?post=3781"}],"version-history":[{"count":2,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/pages\/3781\/revisions"}],"predecessor-version":[{"id":4770,"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/pages\/3781\/revisions\/4770"}],"wp:attachment":[{"href":"https:\/\/webprojects.cloud\/wordpress\/splatco\/wp-json\/wp\/v2\/media?parent=3781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}