Computer Science, asked by rishabh8194, 3 months ago

Name some most common mistakes we make in Qbasic.​

Answers

Answered by samikshajain35
1

Answer:

Here is your answer

Explanation:

Everybody makes mistakes when programming, from simple "oops, typed that wrong." or "oh yeah, forgot the syntax for that." to "What the hell's going on in there?"

Errors are almost inevitable, and fall into one of three main camps :-

  • Typos - the misspelling of a word or command, using the incorrect syntax. For instance using PRJNT instead of PRINT. QBasic upper cases all its keywords so you can usually spot these straight away. It also checks for errors in syntax eg. MID$("ABC",2) gives an error. This is because Mid$ expects a variable or string without the quotes and because it expects another variable

  • Runtime - The spelling and syntax is correct but on running the program it stops with an error message, usually because you or the user have forgotten something. An example of this is trying to open a non-existant file for editing or trying to append text to a file that already exists without opening it for both READ and WRITE.

  • Logic- One of the hardest to remedy. The spelling and syntax is correct, no runtime errors are reported but the program does not behave as it should. It may be something relatively simple like multiplying two variables when they should have been added, or not setting a variable properly so that it's value isn't what you think it should be. In other cases it may be that your logic for a particular piece of code is wrong. Sometimes your logic may be right but the way you implemented it is wrong, so that your program becomes convoluted and takes far longer to complete a task than it should.

hope this helps you

Similar questions