Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / how do I change a dim statment

Author
Message
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Apr 2005 07:13
Hi All

I have a line like so in side a function command
words$(array count(words$(0))) = temp$



Now do I change the variable word$(0) to say word1$(0).

I wish to open 2 or more files and copy the info into arrays like word1$(0), word2$(0)

tried word+str$(number)+$(0) but this does not work.

If you think you know what I am tring to do or can see an easier way let us know.

source code button has full list

In Space No One can Hear You Scream! (When your comm Line is cut?)
wmf
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location:
Posted: 8th Apr 2005 14:23
I would use

dim word$(0,0)

make a pointer to the upper dimension

wordptr = 0

then to redim use

dim word$(wordptr+1,wordptr+1)
inc wordptr

array count() doesn't work to good for dims more than one.
you can change either value or both. if you change both at the same time you only need one pointer.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Apr 2005 22:11
Ha! You can use the other part of dims thought this could only use one part. Now I have a way of controling it.

Cheers that was

In Space No One can Hear You Scream! (When your comm Line is cut?)

Login to post a reply

Server time is: 2024-09-23 17:23:06
Your offset time is: 2024-09-23 17:23:06