# Advanced Macintosh BASIC Programming — source transcripts, page 2

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-advanced-macintosh-basic-programming-1985-fba126/2)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### PDF page 12

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-advanced-macintosh-basic-programming-1985-fba126/2#scan-54ad8a407cbf9e8ab072737af414d960eeb2f4367b69ec603df03a74995d7ee7)

Transcribed text:

0   N -E
This program asks for the numbers 1 and 2 to be entered.
This is done twice; the first time pressing the Return or Enter
key generates a linefeed so that the next printed text appears
on the line beneath the input. The second time the inputs are
requested, pressing Return or Enter   doesn't   generate a linefeed
due to the addition of a semicolon after the keyword   INPUT.
The cursor does not move down to the next line.
After clearing the display   (CLS),   the second line displays
prompts before trying to get keyboard input. After values for
the variables A and B have been entered, a message   (Thank
you, let's do it again)   appears. Finally, the fourth line requests
that the values for A and B be entered again.
The third form of   INPUT   differs from the first by the ad-
dition of a prompt string which is separated from the variable
list by a semicolon. This format displays the prompt just prior
to the normal   INPUT   question mark. In effect, the prompt
string takes the place of a   PRINT   statement prior to the   IN-
PUT.   It   would be logical to make the prompt a message which
tells the user what input is required.
Figure 1-2.   Prompts can be included with   INPUT   to eliminate
the need for a PRINT statement.
D   Program   I   2
Enter 1 :?   1
Enter 2:7   2
Thank you, let's do it   again .
Enter 1 :?   1   Enter 2:7   2   Thank you.
The fourth type of   INPUT   has a semicolon   before   the
prompt string. This has the same effect as the semicolon
before the variable list in the second form of   INPUT.   Try   Pro-
gram 1-2, and enter a   1   or 2 according to the prompt. Com-
pare the resulting display with that of Program 1-1.
Program   1-2.   INPUT   Semicolon   Prompt
CLS
INPUT   "Enter   1 :";A:INPUT   ..   Enter   2:";B
PRINT   ..   Thank you, Jet's do it   again."
INPUT   ;"Enter   1 :";A:INPUT   ;"   Enter   2:";B
PR   I   NT   •   Thank   you."
5

Reading notes: OCR garbling in program listing lines (e.g., 'Enter 2:7', 'Jet's do it') may not reflect exact characters Figure and program labels show spacing artifacts from extraction

Languages: English

[Original PDF page 12](https://www.vintageapple.net/files/98517f0bc949e95bff32622e77def0aad516736370b35c6eb6e68ed43245719f/Advanced_Macintosh_BASIC_Programming_1985.pdf#page=12)

[Previous transcribed scans](https://www.vintageapple.net/transcripts/media/va-advanced-macintosh-basic-programming-1985-fba126/1.md)
