#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# I'm having an "Out of DATA" problem

I am getting an "Out of Data" problem.
Here's the code:
SCREEN 13

FOR y = 1 TO 12
FOR x = 1 TO 12
IF clr = 0 THEN PSET (x, y), 0
IF clr = 1 THEN PSET (x, y), 14
IF clr = 2 THEN PSET (x, y), 15
IF clr = 3 THEN PSET (x, y), 9
IF clr = 4 THEN PSET (x, y), 12
NEXT
NEXT

DATA 001111111000
DATA 011221221100
DATA 011231321100
DATA 011144411100
DATA 011444441100
DATA 011444441100
DATA 011404041100
DATA 011144411100
DATA 010111110100
DATA 011011101100
DATA 011100011100
DATA 001111111000

What am I doing wrong?
[hr]
Jeffrey Hope

Jeffrey's Hermit Cave
· ·

• Posts: 335Member
: I am getting an "Out of Data" problem.
: Here's the code:
: SCREEN 13
:
: FOR y = 1 TO 12
: FOR x = 1 TO 12
: IF clr = 0 THEN PSET (x, y), 0
: IF clr = 1 THEN PSET (x, y), 14
: IF clr = 2 THEN PSET (x, y), 15
: IF clr = 3 THEN PSET (x, y), 9
: IF clr = 4 THEN PSET (x, y), 12
: NEXT
: NEXT
:
: DATA 001111111000
: DATA 011221221100
: DATA 011231321100
: DATA 011144411100
: DATA 011444441100
: DATA 011444441100
: DATA 011404041100
: DATA 011144411100
: DATA 010111110100
: DATA 011011101100
: DATA 011100011100
: DATA 001111111000
:
: What am I doing wrong?
: [hr]
: Jeffrey Hope
:
: Jeffrey's Hermit Cave
:
[code]
FOR y = 1 TO 12
FOR x = 1 TO 12
NEXT
NEXT
[/code]
How many reads are executed in this code? I think you may need to move your READ

----------------
Walt

· ·
• : : I am getting an "Out of Data" problem.
: : Here's the code:
: : SCREEN 13
: :
: : FOR y = 1 TO 12
: : FOR x = 1 TO 12
: : IF clr = 0 THEN PSET (x, y), 0
: : IF clr = 1 THEN PSET (x, y), 14
: : IF clr = 2 THEN PSET (x, y), 15
: : IF clr = 3 THEN PSET (x, y), 9
: : IF clr = 4 THEN PSET (x, y), 12
: : NEXT
: : NEXT
: :
: : DATA 001111111000
: : DATA 011221221100
: : DATA 011231321100
: : DATA 011144411100
: : DATA 011444441100
: : DATA 011444441100
: : DATA 011404041100
: : DATA 011144411100
: : DATA 010111110100
: : DATA 011011101100
: : DATA 011100011100
: : DATA 001111111000
: :
: : What am I doing wrong?
: : [hr]
: : Jeffrey Hope
: :
: : Jeffrey's Hermit Cave
: :
: [code]
: FOR y = 1 TO 12
: FOR x = 1 TO 12
: NEXT
: NEXT
: [/code]
: How many reads are executed in this code? I think you may need to move your READ
:
: ----------------
: Walt
:
:
:
I figured out what was wrong myself... I wasn't putting commas in the data to separate the numbers
[hr]
Jeffrey Hope

Jeffrey's Hermit Cave

· ·