EasyManuals Logo

Atari 65XE User Manual

Atari 65XE
135 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #49 background imageLoading...
Page #49 background image
Line 10 tells the computer to save enough space in its memory for an
answer that is a maximum of 100 characters. The variable in this
program has been named ANSWER. The variable is going to store
letters and numbers, so it is a string variable. String variables are
designated by a dollar sign after the last letter of the variable name.
Line 130 allows you to enter an answer. When you run the program,
the computer displays the question on the screen, and you then type
in your answer. That answer is stored in the string variable called
ANSWER$. If the DIM statement, line 10, was omitted, an Error
message would occur, and the INPUT statement wouldn't work.
?: Courtesy of INPUT
Run the program again. Two question marks will appear on the
screen. The second question mark will be on the line next to the left
margin. List your program and notice that you typed only one question
mark in the program. The INPUT command always puts a question
mark on the screen for you. Type the variation of line 120 below:
120 PRINT HOW DOES THAT MAKE YOU FEEL" ;
Run the program and type in your response when the computer asks
its question. Now only one question mark appears, and your answer
immediately follows the question on the same line. Create some more
dialogue by dimensioning more string variables and inserting more IN-
PUT statements. The DIM statements should be at the beginning of
the program:
20 DIM DATE$ (25)
140
PRINT:PRINT
"WHEN
WOULD
YOU
LIKE
TO
COME
AND
PICK
UP
YOUR PRIZE";
150 INPUT DATE$
RUN
String Variables in PRINT Statements
The computer program now asks two questions but doesn't respond to
your last answer. To get a response, you can place the string variable
in the PRINT statement in the following way:
160 PRINT "I'M SORRY BUT, OUR OFFICES ARE ALWAYS CLOSED
ON ";DATE$;" . TOO BAD! "
The semicolon glues the string variable between two phrases in
quotation marks. Run the program. If the words are not spaced
correctly, compare your line to the line above. You probably left out a
44

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 65XE and is the answer not in the manual?

Atari 65XE Specifications

General IconGeneral
CPUMOS Technology 6502C
CPU Speed1.79 MHz (NTSC) / 1.77 MHz (PAL)
RAM64 KB
ROM16 KB
Release Year1985
GraphicsANTIC and GTIA
Display Resolution320x192
SoundPOKEY sound chip, 4 channels
Operating SystemAtari BASIC
PortsJoystick, Cartridge
StorageExternal 5.25" floppy disk drive

Related product manuals