Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6304

Re: Arrays in BASIC

From Paul Stewart <narrowboat-paul@outlook.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: Arrays in BASIC
Date 2022-01-02 21:56 +0000
Organization Aioe.org NNTP Server
Message-ID <12c0ada459.Paul@outlook.com> (permalink)
References <3261a6a459.Paul@outlook.com> <65baa8a459.harriet@bazleyfamily.co.uk>

Show all headers | View raw


In message <65baa8a459.harriet@bazleyfamily.co.uk>
          Harriet Bazley <harriet@bazleyfamily.co.uk> wrote:

>>L.
>    10 PROCarray
>    16 PRINT D$(1)
>    17 END


>    20 DEF PROCarray
>    30 LOCAL D$()
>    40 DIM D$(7)
>    50 D$(1)="hat"
>    55 PRINT "array", D$(1)
>    60 ENDPROC

>>RUN
> array     hat
> Undimensioned array at line 16

Thanks for this.  Your code works perfectly.
Calling your PROCarray procedure twice, again works as expected.

Trying the same in my code, "Arrays cannot be redimensioned" error.

"Argh"

Something in my code not not right, so will take another look.

Thanks very much for your response.

-- 
Paul Stewart
Sent from A9home running RISC OS 4.42

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Arrays in BASIC Paul Stewart <narrowboat-paul@outlook.com> - 2022-01-02 20:36 +0000
  Re: Arrays in BASIC Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-01-02 21:01 +0000
    Re: Arrays in BASIC Paul Stewart <narrowboat-paul@outlook.com> - 2022-01-02 21:56 +0000
      Re: Arrays in BASIC Paul Stewart <narrowboat-paul@outlook.com> - 2022-01-02 22:18 +0000
    Re: Arrays in BASIC Martin <News03@avisoft.f9.co.uk> - 2022-01-02 22:04 +0000
      Re: Arrays in BASIC Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-01-02 22:43 +0000
        Re: Arrays in BASIC Martin <News03@avisoft.f9.co.uk> - 2022-01-02 23:18 +0000
        Re: Arrays in BASIC Steve Drain <steve@kappa.me.uk> - 2022-01-03 09:46 +0000

csiph-web