Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

What is the fastest way to dump a array

Shouldn't there be a reverse @filearray? With multi-dimensional support.

BTW. Why is the @filearray only one-dimensional?

Arjan

NITV. A reverse @filearray would only require 2 or 3 lines in a user-defined function. (Though I don't know why you'd use it.)

@FILEARRAY is one-dimensional because there's no way to predetermine the file's format, and using the wrong format would terminally trash the array. (The beta testers requested this as well, though none of them could actually come up with either a format or a reason for it.)
 
---Quote
@FILEARRAY is one-dimensional because there's no way to predetermine the file's format, and using the wrong format would terminally trash the array.
---End Quote---


I see your point. But what about this example?

If I would like to use a .csv file for reading information, I have to read the file in an array and then afterwards separate the columns in the .csv in to separate vars or another array. How about an extra option in @fileread that allows me to define the seperator in a line so that will break-up the information and place them in different elements.
The same for @EXECARRAY: @execarray[aresult,pdir /(f)/(",")/(i)]. Two columns separated by a comma.

Having read a complete .csv into a multi-dimensional array, gives me a virtual spreadsheat, that is far easier to manipulate then trying to manipulate a .csv file.
Hence my question how to dump this array back to a file.

---Quote
: A reverse @filearray would only require 2 or 3 lines in a user-defined function.
---End Quote---

Would you please be so kind to give a me an example of such a function, I can't seem to figure out how something like that can be achieved.

Kind regards,

Arjan Feddema
 
Re: What is the fastest way to dump a array

---Quote
@FILEARRAY is one-dimensional because there's no way to predetermine the file's format, and using the wrong format would terminally trash the array.
---End Quote---


I see your point. But what about this example?

If I would like to use a .csv file for reading information, I have to read the file in an array and then afterwards separate the columns in the .csv in to separate vars or another array. How about an extra option in @fileread that allows me to define the seperator in a line so that will break-up the information and place them in different elements.
The same for @EXECARRAY: @execarray[aresult,pdir /(f)/(",")/(i)]. Two columns separated by a comma.

Having read a complete .csv into a multi-dimensional array, gives me a virtual spreadsheat, that is far easier to manipulate then trying to manipulate a .csv file.
Hence my question how to dump this array back to a file.

---Quote
: A reverse @filearray would only require 2 or 3 lines in a user-defined function.
---End Quote---

Would you please be so kind to give a me an example of such a function, I can't seem to figure out how something like that can be achieved.

Kind regards,

Arjan Feddema






*********** REPLY SEPARATOR ***********

On 15-1-2009 at 20:03 rconn wrote:


>---Quote (Originally by Arjan Feddema)---
>Shouldn't there be a reverse @filearray? With multi-dimensional support.
>
>BTW. Why is the @filearray only one-dimensional?
>
>Arjan
>---End Quote---
>
>NITV. A reverse @filearray would only require 2 or 3 lines in a
>user-defined function. (Though I don't know why you'd use it.)
>
>@FILEARRAY is one-dimensional because there's no way to predetermine the
>file's format, and using the wrong format would terminally trash the
>array. (The beta testers requested this as well, though none of them
>could actually come up with either a format or a reason for it.)
>
>
>
>
 
---Quote
@FILEARRAY is one-dimensional because there's no way to predetermine the file's format, and using the wrong format would terminally trash the array.
---End Quote---


I see your point. But what about this example?

If I would like to use a .csv file for reading information, I have to read the file in an array and then afterwards separate the columns in the .csv in to separate vars or another array. How about an extra option in @fileread that allows me to define the seperator in a line so that will break-up the information and place them in different elements.
The same for @EXECARRAY: @execarray[aresult,pdir /(f)/(",")/(i)]. Two columns separated by a comma.

Having read a complete .csv into a multi-dimensional array, gives me a virtual spreadsheat, that is far easier to manipulate then trying to manipulate a .csv file.
Hence my question how to dump this array back to a file.

---Quote
: A reverse @filearray would only require 2 or 3 lines in a user-defined function.
---End Quote---

Would you please be so kind to give a me an example of such a function, I can't seem to figure out how something like that can be achieved.

Kind regards,

Arjan Feddema






*********** REPLY SEPARATOR ***********

On 15-1-2009 at 20:03 rconn wrote:


>---Quote (Originally by Arjan Feddema)---
>Shouldn't there be a reverse @filearray? With multi-dimensional support.
>
>BTW. Why is the @filearray only one-dimensional?
>
>Arjan
>---End Quote---
>
>NITV. A reverse @filearray would only require 2 or 3 lines in a
>user-defined function. (Though I don't know why you'd use it.)
>
>@FILEARRAY is one-dimensional because there's no way to predetermine the
>file's format, and using the wrong format would terminally trash the
>array. (The beta testers requested this as well, though none of them
>could actually come up with either a format or a reason for it.)
>
>
>
>
 

Similar threads

Back
Top