The Commodore 64
From Maze
(Difference between revisions)
(Added transition to hidden code) | (Fixed list) | ||
| Line 30: | Line 30: | ||
Computer languages are like any other written language in that a certain set of assumptions must be shared between those who are reading them before they can make any sense. Writers in French have agreed to read from the left side of a page to the right side, whereas Arabic writers go from right to left. An English apostrophe has been agreed to have a functional meaning that is determined by the reader seeing it in the context of its surrounding text. Similarly, BASIC also makes some assumptions about the meaning of the code a programmer writes, including the expectation that the function CHR$(x) will only have values of x that are whole numbers. The fact that BASIC is running on the Commodore 64 specifically introduces even more assumptions, like the idea that a screen will always be 40 characters wide. A few of the unspoken agreements between programmers, BASIC, and the Commodore 64 include: | Computer languages are like any other written language in that a certain set of assumptions must be shared between those who are reading them before they can make any sense. Writers in French have agreed to read from the left side of a page to the right side, whereas Arabic writers go from right to left. An English apostrophe has been agreed to have a functional meaning that is determined by the reader seeing it in the context of its surrounding text. Similarly, BASIC also makes some assumptions about the meaning of the code a programmer writes, including the expectation that the function CHR$(x) will only have values of x that are whole numbers. The fact that BASIC is running on the Commodore 64 specifically introduces even more assumptions, like the idea that a screen will always be 40 characters wide. A few of the unspoken agreements between programmers, BASIC, and the Commodore 64 include: | ||
| − | 1. Truncation | + | <ol> |
| − | 2. Colors | + | <li>Truncation</li> |
| − | 3. Screen Grid | + | <li>Colors</li> |
| − | 4. Cursor | + | <li>Screen Grid</li> |
| − | 5. Scrolling | + | <li>Cursor</li> |
| + | <li>Scrolling</li> | ||
| + | </ol> | ||
Since these agreements are indeed unwritten they do not appear in the BASIC code that makes 10-Print work. However, they can be understood by adding pseudocode to the program. Pseudocode is a descriptive, informal kind of notation that programmers often use to sketch out the functionality of a program without writing the specific code that will implement that functionality. It cannot be interpreted by the computer, but it is very useful for programmers who want to try to understand how different parts of a program will work and fit together–or in this case, how different parts of the code/BASIC/Commodore 64 system influence the output of running 10-Print's code. | Since these agreements are indeed unwritten they do not appear in the BASIC code that makes 10-Print work. However, they can be understood by adding pseudocode to the program. Pseudocode is a descriptive, informal kind of notation that programmers often use to sketch out the functionality of a program without writing the specific code that will implement that functionality. It cannot be interpreted by the computer, but it is very useful for programmers who want to try to understand how different parts of a program will work and fit together–or in this case, how different parts of the code/BASIC/Commodore 64 system influence the output of running 10-Print's code. | ||
