![]() ![]() If you need reference material, the wiki at should still be reliable. LEN(INKEY$) > 1 when an extended key is pressed, unlike a letter or a number where LEN(INKEY$) = 1. This is why the loop is designed the way it is. An arrow key is an example of an extended key, and there are others too. ' The same is true with the other choices.Īlso, be careful when using INKEY$. ' works instead of testing for "A" and "a". ' Making the choice uppercase means testing only "A" ' Print the menu and get the operation to perform.ĬASE "A", "S", "M", "D", "a", "s", "m", "d" It should give you an idea on how to do things. I will say it is untested, so it may not work as intended. ![]() It is fairly basic (no pun intended), but it is worth looking at. I tried INPUT but it echoed the character typed by it means that I was not able to get the perfect coordinates. I'm also using INKEY$ to get the key entered by user. ![]() I am using LOCATE, but I am not getting the results I want, and yes I am trying this without Graphics. This all in a Box that is centered on the Screen. PRINT "The Quotient is " n1 / n2 " and the remainder is " n1 MOD n2īut this time I want a more sophisticated one, like: PRINT "Difference between " n1 " and " n2 " is " n1 - n2 I am making a simple calculator in QBasic, for that want to implement a Menu, the practice which I followed was: PRINT "Select an Option" ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |