{"id":1135,"date":"2016-04-07T02:03:54","date_gmt":"2016-04-07T02:03:54","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/?p=1135"},"modified":"2016-04-07T09:17:16","modified_gmt":"2016-04-07T09:17:16","slug":"higher-reading-standard-reference-language","status":"publish","type":"post","link":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/2016\/04\/07\/higher-reading-standard-reference-language\/","title":{"rendered":"Higher &#8211; Reading Standard Reference Language"},"content":{"rendered":"<p>I would like to remind you that there is no requirement to write answers using <a href=\"http:\/\/www.sqa.org.uk\/files_ccc\/Computing%20Science%20Higher%20Reference%20Language%20Specification.pdf\" target=\"_blank\">Standard Reference Language<\/a> (SRL). The SQA can sometimes refer to Standard Reference Language as &#8220;Pseudocode&#8221;, however, as I have previously\u00a0explained this is not the case. <a href=\"http:\/\/www.bbc.co.uk\/education\/guides\/z3bq7ty\/revision\/2\" target=\"_blank\">Pseudocode<\/a> is an informal design that explains a programs function using English like structure.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>Examples<\/strong><\/span><\/p>\n<p class=\"p1\"><i>Read in a number representing a temperature in degrees Celsius and write it out as a value in degrees Fahrenheit. If the Celsius value is c, then the Fahrenheit value, f, is calculated as follows: f = ( 9 \/ 5 ) * c + 32.<\/i><\/p>\n<pre style=\"padding-left: 30px\">RECEIVE c FROM (INTEGER) KEYBOARD \r\nDECLARE f INITIALLY ( 9.0 \/ 5.0 ) * c + 32 \r\nSEND f TO DISPLAY\r\n<\/pre>\n<p class=\"p1\"><i>Read in 10 numbers and write out the average of those numbers.<\/i><\/p>\n<pre style=\"padding-left: 30px\">DECLARE total INITIALLY 0 \r\nDECLARE count INITIALLY 0 \r\nWHILE count &lt; 10 DO \r\n    RECEIVE nextInput FROM (INTEGER) KEYBOARD \r\n    SET total TO total + nextInput \r\n    SET count TO count + 1 \r\nEND WHILE \r\nSEND total \/ 10.0 TO DISPLAY\r\n<\/pre>\n<p>When reading SRL start at the top, working down each line. Take a note on scrap paper of the values given to variables. In SRL constructs start with their NAME and finish with an END and their name. Subprograms can either be a PROCEDURE or FUNCTION, these are named and have parameters (arguments) in parenthesises, functions will have one or more RETURN statements.<\/p>\n<p><span style=\"text-decoration: underline\"><strong>Tips<\/strong><\/span><\/p>\n<ul>\n<li>If you are asked for the results of the program then pay attention to the IF statements to make sure that you branch the program correctly. Check the number of repetitions on loops as well.<\/li>\n<li>If you are asked to spot an error in the code it will more than likely be a logical error rather than a syntax error.<\/li>\n<\/ul>\n<p>There is an <a href=\"http:\/\/haggis4sqa.appspot.com\/haggisParser.html\" target=\"_blank\">online Haggis (SRL) checker here<\/a>, remember you don&#8217;t need to write SRL just read it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I would like to remind you that there is no requirement to write answers using Standard Reference Language (SRL). The SQA can sometimes refer to Standard Reference Language as &#8220;Pseudocode&#8221;, however, as I have previously\u00a0explained this is not the case. Pseudocode is an informal design that explains a programs function using English like structure. Examples &hellip;<\/p>\n","protected":false},"author":32,"featured_media":1078,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17935,17932,319,17009],"tags":[],"class_list":["post-1135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-algorithm-specification","category-computational-constructs","category-oldhigher","category-software-design-devlopment"],"jetpack_featured_media_url":"https:\/\/blogs.glowscotland.org.uk\/nl\/public\/ColtnessHS-ComputingScience\/uploads\/sites\/12638\/2016\/03\/higher.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/users\/32"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/comments?post=1135"}],"version-history":[{"count":4,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1135\/revisions"}],"predecessor-version":[{"id":1143,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/posts\/1135\/revisions\/1143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media\/1078"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/media?parent=1135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/categories?post=1135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/nl\/ColtnessHS-ComputingScience\/wp-json\/wp\/v2\/tags?post=1135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}