-->
Page 1 of 1

Dim a$(3) ; a$(-1)="hi"

PostPosted: Fri Aug 26, 2016 9:06 pm
by raintime
Crash. HALT would be preferred.

Re: Dim a$(3) ; a$(-1)="hi"

PostPosted: Fri Aug 26, 2016 9:10 pm
by Mmiscool
You cant use a negative number for the array eliment.

Must use positive numbers.

Re: Dim a$(3) ; a$(-1)="hi"

PostPosted: Mon Aug 29, 2016 5:53 pm
by raintime
If for some reason an array index becomes negative, which is not allowed, an error message should occur and BASIC halt. The system should never crash!

Re: Dim a$(3) ; a$(-1)="hi"

PostPosted: Mon Sep 12, 2016 1:25 am
by livetv
If the interpreter is not checking bounds, the reference could be to some bizarre memory locations.

I'm having a different problem with arrays which I'll report formally if I can document it better.