Syntax error in for ???

Basic and Machine Language

Moderator: Moderators

Post Reply
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Syntax error in for ???

Post by nippur72 »

Hello, I'm new here, back to the glorious vic20 after more than 20 years!

I'm familiarizing again with Basic, retrieving from my memory what has been kept buried for all this time.

I remember there were integer variables, but if I type:

10 FOR T%=0 TO 255

I get "?syntax error in 10".

I don't remember/realize why this happen. Can anyone help me?

-Nino

(P.S. I know integer variables don't give any additional speed, it's just for curiosity)
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Simple. You can not use integer variables in FOR statements. You can use them for a lot of other purposes though, mainly useful in big numeric arrays where you only need to store integer numbers.
Anders Carlsson

Image Image Image Image Image
Post Reply