Re: LENGTH OF SEQUENCES
ZNorQ wrote:
>
> I tried looking around for a solution to my problem, but I haven't found
> one yet, so please bare with me on this one if it's been explained before.
>
> The length function is sometimes not sufficient for me, as I might want to
> determin the TRUE length of a sequence. Let's say i have a sequence 'Stuff'
> that has the following structure;
>
> {
> {"Data1.1", 0, 0},
> {"Data2.1", "Data2.2"},
> {"Data3.1", {"Data3.2.1", "Data3.2.2"}}
> }
>
> Now, if I'm not mistaking, the length of 'stuff' - length(stuff) - would
> in this case result in 3 as it counts only the upper levels of the sequence.
> And, as you can see, the data structure is inconsistent and it might (afaik)
> take some programming to determin the true structure of 'stuff'. What I
> want is to have a function that returns the whole content of a structure
> in a one level sequence, eg. for 'stuff' this would be;
> {"Data1.1", 0, 0, "Data2.1", "Data2.2", "Data3.1", "Data3.2.1", "Data3.2.2"}
> or in other words; the whole structure of 'stuff' converted into a string.
>
> I'm gonna use this to display the content sequences in a readable format
> for message_box. (Where I will ofcourse exchange non-printable char's into
> a "." - or what ever char i decide to use.)
>
I use a modified version of Gabriel Boehme's print.e, which I've called
sprint.e. You can get the file from several sources: EDB, EuSQL, matheval,
all in the RDS User Contributions.
Matt Lewis
|
Not Categorized, Please Help
|
|