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 / 3 questions related to arrays and or saving files

Author
Message
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 7th Sep 2003 03:06 Edited at: 7th Sep 2003 03:58
1) Can arrays hold strings? It does not work for me do I neeed a $ after the name? That does not work either.
2) If not, can you write ints to .txt files? All it does for me is make a square thing.
3) If not, can you write more than one thing on the same line to a file? I cannot figure out how.

Any help would be appreciated, I am using DBC.

Here is the code for the project I am using it with. It is a Matrix Editor. It contains no media and I have been building it from scratch.



I am trying to make the output like:

3,2,1,4
2,3,2,2
1,2,1,2
1,2,3,4

Instead of:

1,
2,
3,
6,
etc.

Once again, any help would be appreciated.

Thanks.

"Computers in the future may weigh no more then
1.5 tons.
- Popular Mechanics, 1949
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th Sep 2003 04:04 Edited at: 7th Sep 2003 04:05
1) Dim strMyStringArray$(index) - index being one less than total members needed

2) Write anything to files. Convert integers to strings with STR$() before attempting to write out.

3) convert and join up your data into a valid string first, then write it to a file line

-RUST-
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 7th Sep 2003 07:26
Thanks, But for the 2nd question, I need to do that without using the write string command. Is that possible?

"Computers in the future may weigh no more then
1.5 tons.
- Popular Mechanics, 1949
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 7th Sep 2003 12:20
get your integer and convert it into a string$



David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 7th Sep 2003 16:59 Edited at: 7th Sep 2003 17:00
Quote: "Thanks, But for the 2nd question, I need to do that without using the write string command. Is that possible? "


Yes!




then



You may also be interested in the following commands:



Theres no place like 127.0.0.1
There are 10 people in this world, those who understand binary and those who don't
Bus station = where bus stops. Train station = where train stops. Workstation = ?
Ocean Runner
21
Years of Service
User Offline
Joined: 18th May 2003
Location: United States
Posted: 7th Sep 2003 23:28
Thanks for all your help I have it figured out now.

"Computers in the future may weigh no more then
1.5 tons.
- Popular Mechanics, 1949

Login to post a reply

Server time is: 2024-11-25 06:56:46
Your offset time is: 2024-11-25 06:56:46