🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.basic.visual.misc
Article #338

Re: :::::::: Dynamic Array Dillema ::::::::

#338
From: Mike Williams
Date: Sun, 07 Oct 2001 04:00
43 lines
2385 bytes
You can only change the size of the last dimension of the array. Just swap
them about and you will then be able to do:

ReDim Preserve EXP(4, EXP_Max) As String

Mike


"sou|burn" <ralfvb@msn.com> wrote in message
news:9po9gh$qjs$1@ctb-nnrp1.saix.net...
> Hi there
>
> I'm having trouble with the following code
>
>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> ::::::::::::::::::::::::::::::::::::::::::::::::::
> Public EXP()
> EXP_Max as integer
> v2 is a integer (always stays smaller than EXP_Max)
> sTag is a string
>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> ::::::::::::::::::::::::::::::::::::::::::::::::::
> Select Case Left$(sTag, 3)
>     Case "ENG"
>         ReDim Preserve EXP(EXP_Max, 4) As String
>         EXP_Max = EXP_Max + 1
>         EX(v2, 0) = sTag
> End Select
>
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
> ::::::::::::::::::::::::::::::::::::::::::::::::::
>
> I get an "subscript out of range" error on the ReDim line as soon as
EXP_Max
> = 2, meaning there are values in the array that needs 2 b "preserved"
>
> any help would be very much appreciated
>
> sou|burn
>
>
Technical Details
Message-ID: <9pojuj$udb$1@news7.svr.pol.co.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!news.theplanet.net!not-for-mail
References: <9po9gh$qjs$1@ctb-nnrp1.saix.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 110e3b,27dc3c52f32509a3
X-Google-Attributes: gid110e3b,public
X-Google-Thread: 108062,27dc3c52f32509a3
X-Google-Attributes: gid108062,public
X-Google-ArrivalTime: 2001-10-07 00:39:09 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!diablo.theplanet.net!news.theplanet.net!not-for-mail
From: "Mike Williams" <mike@peetsmill.freeserve.co.uk>
Newsgroups: comp.lang.basic.visual.misc,cz.comp.lang.basic.visual
Subject: Re: :::::::: Dynamic Array Dillema ::::::::
Date: Sun, 7 Oct 2001 05:00:27 +0100
Lines: 45
Message-ID: <9pojuj$udb$1@news7.svr.pol.co.uk>
References: <9po9gh$qjs$1@ctb-nnrp1.saix.net>
NNTP-Posting-Host: modem-69.treecreeper.dialup.pol.co.uk
X-Trace: news7.svr.pol.co.uk 1002427155 31147 62.137.152.69 (7 Oct 2001 03:59:15 GMT)
NNTP-Posting-Date: 7 Oct 2001 03:59:15 GMT
X-Complaints-To: abuse@theplanet.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400