{"id":11587,"date":"2021-12-08T05:17:05","date_gmt":"2021-12-08T05:17:05","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=11587"},"modified":"2021-12-08T05:18:05","modified_gmt":"2021-12-08T05:18:05","slug":"pascal-keypressed-and-readkey","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/pascal-keypressed-and-readkey\/23323.html","title":{"rendered":"Pascal KeyPressed And ReadKey"},"content":{"rendered":"<p>Hey, I&#8217;ve been messing with pascal lately and I&#8217;m stuck at one point, thought that you guys could help me.<\/p>\n<p>So the thing, that I want to do is, while a person is pressing a desired key the circle would move, when he stops doing that, it will stop. I don&#8217;t know why, but I can&#8217;t get it right, could you guys look at my little project ant tell me what&#8217;s wrong? Thanks.<\/p>\n<p>program programa;<br \/>\nuses graph, crt;<br \/>\nlabel prad\u017eia;<br \/>\nvar<br \/>\nx, y, z: integer;<br \/>\nkey: char;<\/p>\n<p>procedure grafika;<br \/>\nvar gt, gb: integer;<br \/>\nbegin<br \/>\ngt := Detect;<br \/>\nInitGraph (gt, gb, &#8216;C:\\TP\\BGI\\&#8217;)<br \/>\nend;<\/p>\n<p>begin<br \/>\ngrafika;<br \/>\nx := 980;<br \/>\ny := 500;<br \/>\nz := 30;<br \/>\nprad\u017eia:<br \/>\nSetColor (yellow);<br \/>\nCircle (x, y, z);<br \/>\nSetFillStyle (SolidFill, yellow);<br \/>\nFloodFill (x, y, yellow);<br \/>\nkey := ReadKey;<br \/>\nif (key = #97) then<br \/>\nbegin<br \/>\ninc(x);<br \/>\nGoTo prad\u017eia;<br \/>\nend;<\/p>\n<p>readln; readln;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":3},"question-category":[55],"question_tags":[],"class_list":["post-11587","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/11587","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=11587"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=11587"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=11587"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=11587"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}