Howdy, Stranger!

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

Categories

Error: index expected

ActorActor Member Posts: 441 ✭✭

I'm getting an error message from the compiler, "index expected." It occurs on lines such as

A(N) = A

Background: I copied the code from a forum. The poster indicates that it's not his code and that he got it from a book. I'm using the freebasic compiler. To compile I type in

fbc posex.bas -lang qb

It does not compile if I omit "-lang qb".

There are dozens of such lines as the above. The compiler obviously wants an index for the right hand variable. But what gives? Did the programmer have access to a version of BASIC which implemented some kind of default index? Should I replace the line with

A(N) = A(1)

or possibly

A(N) = A(0)

Sign In or Register to comment.