Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Borders cropped from the Getting Started screenshots. #167

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions beginninginbasic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ \section{Your first BASIC programmes}
line of input you have typed. When you do this, you should see a message something
like the following:

\screenshotwrap{images/syntax-error.png}
\screenshotwrap{images/getting-started/syntax-error.png}

If you saw a \screentextwide{SYNTAX ERROR} message something like that one, then congratulations:
You have succeeded in communicating with the computer!\index{Errors!Syntax}\index{SYNTAX ERROR}
Expand Down Expand Up @@ -118,7 +118,7 @@ \section{Your first BASIC programmes}
% following screenshot
Hopefully now you will see something like the following:

\screenshotwrap{images/print-hello-computer.png}
\screenshotwrap{images/getting-started/print-hello-computer.png}

This time no new \screentextwide{SYNTAX ERROR} message should appear. But if some kind
of error message has appeared, just try typing in the command again, after
Expand All @@ -142,7 +142,7 @@ \section{Your first BASIC programmes}
% following screenshot
You can try it, if you like, and you should see something like the following:

\screenshotwrap{images/print-hello-computer-no-quotes.png}
\screenshotwrap{images/getting-started/print-hello-computer-no-quotes.png}

In the above examples we typed commands in directly, and the computer executed
them immediately after you pressed the \specialkey{RETURN} key. This is why
Expand Down Expand Up @@ -172,7 +172,7 @@ \section{Your first BASIC programmes}
% following screenshot
When you have done this, the screen should show something like this:

\screenshotwrap{images/first-steps-for-loop-programme-1.png}
\screenshotwrap{images/getting-started/first-steps-for-loop-programme-1.png}

If it doesn't you
can try again. Don't forget, if you feel that the computer is getting all muddled up,
Expand Down Expand Up @@ -237,7 +237,7 @@ \section{Your first BASIC programmes}
So just type in the word \screentextwide{RUN} and press the \specialkey{RETURN} key. You should then see a display
that looks something like the following:

\screenshotwrap{images/first-steps-for-loop-programme-1-running.png}
\screenshotwrap{images/getting-started/first-steps-for-loop-programme-1-running.png}

You might notice a couple of things here:

Expand All @@ -261,7 +261,7 @@ \section{Your first BASIC programmes}
If you would like to replace any of the commands in the programme, you can type a new line that has the same number as the one you
wish to change.

\screenshotwrap{images/first-steps-for-loop-programme-1-listing.png}
\screenshotwrap{images/getting-started/first-steps-for-loop-programme-1-listing.png}

\needspace{4cm} % Dont allow following paragraph to separate from
% following screenshot
Expand All @@ -285,7 +285,7 @@ \section{Your first BASIC programmes}
You can then use the \screentextwide{RUN} command to run the modified
programme, like this:

\screenshotwrap{images/first-steps-for-loop-programme-1-modified.png}
\screenshotwrap{images/getting-started/first-steps-for-loop-programme-1-modified.png}

It is quite easy to modify your programmes in this way. As you become more comfortable with the process, there are two
additional helpful tricks:
Expand Down Expand Up @@ -360,7 +360,7 @@ \section{First steps with text and numbers}
variable names or strings? Let's try typing in a variable name, say \screentextwide{N}, and pressing the \specialkey{RETURN} key,
and see what happens. And then lets try with a string, say \screentextwide{"THIS IS A STRING"}.

\screenshotwrap{images/typing-variable-name-or-string}
\screenshotwrap{images/getting-started/typing-variable-name-or-string}

You should get a syntax error each time, telling you that the computer doesn't understand the input you have given it.
Let's start with when you typed the variable: If you just tell the computer the name of a stored piece of information,
Expand All @@ -383,7 +383,7 @@ \section{First steps with text and numbers}
So if you type \screentextwide{1 ? N}, and then \screentextwide{LIST}, you will see \screentextwide{1 PRINT N}, as we can see
in the following screen-shot:

\screenshotwrap{images/print-question-mark}
\screenshotwrap{images/getting-started/print-question-mark}

Like we saw in the last section, the variable \screentextwide{N} has not had a value stored in it, so when the computer looks for
what is there, it finds nothing. Because \screentextwide{N} is a {\em numeric variable}\index{variable!numeric}, when there is
Expand Down Expand Up @@ -422,7 +422,7 @@ \section{First steps with text and numbers}
% following screenshot
If we try those, we will see something like the following:

\screenshotwrap{images/let-command-examples}
\screenshotwrap{images/getting-started/let-command-examples}

\needspace{4cm} % Dont allow following paragraph to separate from
% following screenshot
Expand All @@ -436,7 +436,7 @@ \section{First steps with text and numbers}
ERROR}\index{Errors!Type mismatch}\index{Type mismatch error} like
this:

\screenshotwrap{images/type-mismatch-errors}
\screenshotwrap{images/getting-started/type-mismatch-errors}

This leads us to a rather important point: \screentextwide{N} and
\screentextwide{N\$} are separate variables, even though they have
Expand Down Expand Up @@ -473,7 +473,7 @@ \section{First steps with text and numbers}
ERROR}\index{Errors!Illegal Direct}\index{Illegal Direct Error}.
Try it, and you should see something like the following

\screenshotwrap{images/illegal-direct-error}
\screenshotwrap{images/getting-started/illegal-direct-error}

\needspace{4cm}
This means that the \stw{INPUT} command can only be used as part of a
Expand All @@ -491,7 +491,7 @@ \section{First steps with text and numbers}
second line will print the string \stw{"YOU TYPED"}, followed by
what the \stw{INPUT} command read from the user. Let's try it out:

\screenshotwrap{images/input-example-1}
\screenshotwrap{images/getting-started/input-example-1}

Did you expect that to happen? What is this question mark doing there?
The \stw{?} here is the computer's way of telling you that a
Expand All @@ -513,7 +513,7 @@ \section{First steps with text and numbers}
something in, and press the \specialkey{RETURN} key to tell the
computer that you are done, the programme will continue, like this:

\screenshotwrap{images/input-example-2}
\screenshotwrap{images/getting-started/input-example-2}

\needspace{4cm}
Of course, we didn't really know what to type in, because the programme
Expand All @@ -533,7 +533,7 @@ \section{First steps with text and numbers}
expect them to do, and the whole experience will make a lot more sense
for them:

\screenshotwrap{images/input-example-3}
\screenshotwrap{images/getting-started/input-example-3}

When we run the programme, we first see the \stw{WHAT IS YOUR NAME} message
from line 1. The computer doesn't print the double-quote symbols,
Expand Down Expand Up @@ -564,7 +564,7 @@ \section{First steps with text and numbers}
programme will adapt its output to what we type. Pretty nifty, right?
Let's have the rest of the crew try it out:

\screenshotwrap{images/input-extra-ignored-1}
\screenshotwrap{images/getting-started/input-extra-ignored-1}

We can see that each time the programme prints out the message
customised with the input that you typed in\ldots Until we get to
Expand Down Expand Up @@ -597,7 +597,7 @@ \section{First steps with text and numbers}
first quote marks the start of a new piece of information. We can
see the difference it makes below:

\screenshotwrap{images/input-quoting-1}
\screenshotwrap{images/getting-started/input-quoting-1}

\needspace{1.5cm}
While this can all be a bit annoying at times, it has a purpose: The
Expand Down Expand Up @@ -625,7 +625,7 @@ \section{First steps with text and numbers}
which is not what we meant. So let's see what it looks like when we
give \stw{LISTER, 3000000} as input to the programme:

\screenshotwrap{images/input-multiple-1}
\screenshotwrap{images/getting-started/input-multiple-1}

In this case, the \stw{INPUT}\index{INPUT}
\index{BASIC 65 Commands!INPUT} command reads the two pieces of
Expand Down Expand Up @@ -654,7 +654,7 @@ \section{First steps with text and numbers}
looks if we give this input to our programme:


\screenshotwrap{images/input-multiple-2}
\screenshotwrap{images/getting-started/input-multiple-2}

Until now we have been asking the user to input information by using a
\stw{PRINT} command to display the message, and then an \stw{INPUT}
Expand Down Expand Up @@ -686,7 +686,7 @@ \section{First steps with text and numbers}
on any line of the screen that is blank. This will show the revised
version of the programme. For example:

\screenshotwrap{images/replacing-line-1}
\screenshotwrap{images/getting-started/replacing-line-1}

\needspace{3cm}
We still have a little problem, though: Line 1 will print the message
Expand All @@ -704,7 +704,7 @@ \section{First steps with text and numbers}
We can confirm that the contents of the line have been deleted by
running the \stw{LIST} command again, like this:

\screenshotwrap{images/deleting-line-1}
\screenshotwrap{images/getting-started/deleting-line-1}

Did you notice something interesting? When we told the computer to
make line 1 of the programme empty, it deleted it completely!
Expand All @@ -725,7 +725,7 @@ \section{First steps with text and numbers}
As usual, just type in the \stw{RUN} command and hit the
\specialkey{RETURN} key. You should see something like this:

\screenshotwrap{images/input-comma}
\screenshotwrap{images/getting-started/input-comma}

\needspace{2.5cm}
We can see our prompt of \stw{WHAT IS YOUR NAME AND AGE} there, but
Expand All @@ -741,7 +741,7 @@ \section{First steps with text and numbers}
\needspace{4cm}
Now if we run the programme, we should see what we are looking for:

\screenshotwrap{images/input-semicolon}
\screenshotwrap{images/getting-started/input-semicolon}

\subsubsection{Exercises to try}

Expand Down Expand Up @@ -889,7 +889,7 @@ \section{Making simple decisions}
\stw{IF} -- \stw{THEN} command. If you type in those commands, you
should see something like the following:

\screenshotwrap{images/if-then-less-than-examples}
\screenshotwrap{images/getting-started/if-then-less-than-examples}

We can see that only the \stw{PRINT} commands that followed an
\stw{IF} command that has a true value were executed. The rest
Expand Down Expand Up @@ -920,7 +920,7 @@ \section{Making simple decisions}
can tell us which of the two numbers we give it is biggest, or if they
are equal:

\screenshotwrap{images/if-compare-variables-1}
\screenshotwrap{images/getting-started/if-compare-variables-1}

Notice how in this programme, we didn't use fixed numbers in the
\stw{IF} command, but instead gave variable names instead. This is
Expand Down Expand Up @@ -967,7 +967,7 @@ \section{Making simple decisions}
using the \stw{IF} command and an appropriate relative operator to
make each decision. This works well, to a point. For example:

\screenshotwrap{images/guess-number-1}
\screenshotwrap{images/getting-started/guess-number-1}

We can see that it prints the message, and it asks for a guess, and
responds appropriately. But if we want to guess again, we have to use
Expand Down Expand Up @@ -1033,14 +1033,14 @@ \section{Making simple decisions}
sure that you have successfully modified the programme. You should
see your modified line with the \stw{Ƴ} symbol in it.

\screenshotwrap{images/guess-number-2}
\screenshotwrap{images/getting-started/guess-number-2}

\needspace{2cm}
If you now run the programme by typing in \stw{RUN} and pressing the
\specialkey{RETURN} key as usual, the 2\textsuperscript{nd} line tells
the compute to clear the screen before printing the rest of the message, like this:

\screenshotwrap{images/guess-number-3}
\screenshotwrap{images/getting-started/guess-number-3}

This hides the listing from the user, so that they can't immediately see
what our secret number is. We can type our guess in, just like before,
Expand Down Expand Up @@ -1084,7 +1084,7 @@ \section{Making simple decisions}
to 10, 20, \ldots, 60. We can see that this has happened by using the
\stw{LIST} command:

\screenshotwrap{images/renumber-1}
\screenshotwrap{images/getting-started/renumber-1}

\needspace{3cm}
Now our life is much easier: We can choose any number that is between
Expand Down Expand Up @@ -1113,7 +1113,7 @@ \section{Making simple decisions}
We can type those lines in, and then use \stw{LIST} command to make
sure the result is correct:

\screenshotwrap{images/guess-number-4}
\screenshotwrap{images/getting-started/guess-number-4}

That's looking pretty good. But there are a couple of little problems still.
Can you work out what they might be? What will happen now after the user makes a guess?
Expand Down Expand Up @@ -1184,12 +1184,12 @@ \section{Making simple decisions}
If you type those lines in, and \stw{LIST} the programme again, you
should see something like the following:

\screenshotwrap{images/guess-number-5}
\screenshotwrap{images/getting-started/guess-number-5}

\needspace{4cm}
We can now \stw{RUN} the programme, and see whether it worked. Let's try it!

\screenshotwrap{images/guess-number-6}
\screenshotwrap{images/getting-started/guess-number-6}

The screen still clears, which is good. Can you notice one little
difference already, though? There is a blank line above the first
Expand All @@ -1207,7 +1207,7 @@ \section{Making simple decisions}
number. And after 10 guesses, it stops asking for guesses, and goes
back to the \stw{READY.} prompt, like this:

\screenshotwrap{images/guess-number-7}
\screenshotwrap{images/getting-started/guess-number-7}

\needspace{2cm}
It would be nice to tell the user if they have run out of
Expand All @@ -1224,7 +1224,7 @@ \section{Making simple decisions}
Now if the user doesn't guess the number, they will get a useful
message, like this:

\screenshotwrap{images/guess-number-8}
\screenshotwrap{images/getting-started/guess-number-8}

\subsubsection{Exercises to try}

Expand Down Expand Up @@ -1317,7 +1317,7 @@ \section{Random numbers and chance}
Each time you type this, it will give a different answer, as you can
see here:

\screenshotwrap{images/rnd-1}
\screenshotwrap{images/getting-started/rnd-1}

We can see that this gives us several different results: \stw{1.07870447E-03},
\stw{.793262171}, \stw{.44889513}, \stw{.697215893}. Each of these is
Expand Down Expand Up @@ -1374,7 +1374,7 @@ \section{Random numbers and chance}
tell you where it was up to at the time. In the case of the screenshot
below, it was working on line 10:

\screenshotwrap{images/rnd-2}
\screenshotwrap{images/getting-started/rnd-2}

\needspace{2cm}
That works nicely, and draws a very famous maze \cite{montfort201210}.
Expand Down
Binary file removed images/deleting-line-1.png
Binary file not shown.
Binary file removed images/first-steps-for-loop-programme-1-listing.png
Binary file not shown.
Binary file removed images/first-steps-for-loop-programme-1-modified.png
Binary file not shown.
Binary file removed images/first-steps-for-loop-programme-1-running.png
Binary file not shown.
Binary file removed images/first-steps-for-loop-programme-1.png
Binary file not shown.
Binary file added images/getting-started/deleting-line-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/guess-number-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/if-compare-variables-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/illegal-direct-error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/input-comma.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/input-example-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/input-example-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/input-example-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/getting-started/input-extra-ignored-1.png
Binary file added images/getting-started/input-multiple-1.png
Binary file added images/getting-started/input-multiple-2.png
Binary file added images/getting-started/input-quoting-1.png
Binary file added images/getting-started/input-semicolon.png
Binary file added images/getting-started/let-command-examples.png
Binary file added images/getting-started/print-question-mark.png
Binary file added images/getting-started/renumber-1.png
Binary file added images/getting-started/replacing-line-1.png
Binary file added images/getting-started/rnd-1.png
Binary file added images/getting-started/rnd-2.png
Binary file added images/getting-started/syntax-error.png
Binary file added images/getting-started/type-mismatch-errors.png
Binary file removed images/guess-number-1.png
Diff not rendered.
Binary file removed images/guess-number-2.png
Diff not rendered.
Binary file removed images/guess-number-3.png
Diff not rendered.
Binary file removed images/guess-number-4.png
Diff not rendered.
Binary file removed images/guess-number-5.png
Diff not rendered.
Binary file removed images/guess-number-6.png
Diff not rendered.
Binary file removed images/guess-number-7.png
Diff not rendered.
Binary file removed images/guess-number-8.png
Diff not rendered.
Binary file removed images/if-compare-variables-1.png
Diff not rendered.
Binary file removed images/if-then-less-than-examples.png
Diff not rendered.
Binary file removed images/illegal-direct-error.png
Diff not rendered.
Binary file removed images/input-comma.png
Diff not rendered.
Binary file removed images/input-example-1.png
Diff not rendered.
Binary file removed images/input-example-2.png
Diff not rendered.
Binary file removed images/input-example-3.png
Diff not rendered.
Binary file removed images/input-extra-ignored-1.png
Diff not rendered.
Binary file removed images/input-multiple-1.png
Diff not rendered.
Binary file removed images/input-multiple-2.png
Diff not rendered.
Binary file removed images/input-quoting-1.png
Diff not rendered.
Binary file removed images/input-semicolon.png
Diff not rendered.
Binary file removed images/let-command-examples.png
Diff not rendered.
Binary file removed images/print-hello-computer-no-quotes.png
Diff not rendered.
Binary file removed images/print-question-mark.png
Diff not rendered.
Binary file removed images/renumber-1.png
Diff not rendered.
Binary file removed images/replacing-line-1.png
Diff not rendered.
Binary file removed images/rnd-1.png
Diff not rendered.
Binary file removed images/rnd-2.png
Diff not rendered.
Binary file removed images/syntax-error.png
Diff not rendered.
Binary file removed images/type-mismatch-errors.png
Diff not rendered.
Binary file removed images/typing-variable-name-or-string.png
Diff not rendered.