On 12/17/2016 01:56 PM, Prof. Dr. Johannes Grabmeier privat wrote:
> A very natural application is to read in a CSV file and get as many
> Strings - possibly empty ones - as the number of occurencies of the
> splitting character indicates (+1):

I support that change.

> (1) -> line := "A;B;;C;;"
> 
>    (1)  "A;B;;C;;"
>                                          Type: String
> (2) -> c := char ";"
> (3) -> split(line, c)
> 
>    (3)  ["A","B","C"]
>                                          Type: List(String)
> 
> This is not what I expect. Here is a fix in IndexedString:

Right. It should give

  ["A","B","","C","",""]

>     split(s, c) ==
>         n := maxIndex s
>         --for i in mn..n while s.i = c repeat 0

Wow! This commented line is currently in the code. I wouldn't have
expected that the value of i is still valid after the for loop.

> If there are good reasons - would like to know - for the current
> implementation, then I would suggest to add a second a pair of split
> functions of this behaviour, otherwise I would suggest to switch to this
> interpretation.

I support a switch. But I cannot easily say whether that switch would
affect other known behaviour/tests since I haven't yet re-compiled FriCAS.

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to