[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTAB won't work!! My strings aren't printing right!! My program isn't working!!!



Jon Bettencourt wrote:
> 
> Is HTAB supposed to work in 80-column mode?

I don't have any Trouble with HTAB on an 80 column screen in Applesoft.

> I have a program that's
> _supposed_ to put 1 to 54 tewenty-one-character-long strings onto a 3 by
> 18 grid on the 80-column screen, but the strings get scrambled all over
> the place.
> 
> I'm trying this:
> 
> 170 FOR X=1 TO N
> 175 H=INT((X-1)/18):V=X-(H*18):H=H*21:H=H+1
> 180 HTAB H:VTAB V+3:PRINT ST$(X)
> 185 NEXT X
> 
> N is the number of strings in the ST$ array.

The code you have works properly, except for one strange bug: the first value is
at the wrong position.

That is fixed by inserting the line:
179 VTAB1:?
which sets up the next print correctly.

The VTAB 1 prevents accidental screen scrolling.

-- 
\  /\  /                                       If you aren't happy,
 VVizVVom - Wandering Kernel of Happiness           it's not my fault.
 ~~~> homepage at http://pages.ripco.net/~wizwom/ <~~~