Help - What is Mathematica reversing my file !!

Discussion in 'Symbolic Algebra' started by Dave, Dec 13, 2007.

  1. Dave

    Dave Guest

    I have put this in a text file

    aaa
    bbb
    ccc

    eee
    ff
    ggg



    I've then imported that into a notebook by using "File" on the "Insert"
    menu.

    What I find when I look in the notebook is

    eee
    ff
    ggg


    aaa
    bbb
    ccc


    In other words, although the items which were separated by a new line
    are imported in the same order, an items which are separated by a new
    line are read in the reverse order!
     
    Dave, Dec 13, 2007
    #1
    1. Advertisements

  2. Dave

    Dave Guest




    Oops, I mean if a blank line is used, it behaves very odd.
     
    Dave, Dec 13, 2007
    #2
    1. Advertisements

  3. sounds like a bug. I tried different formats on window XP.

    Notice it works ok with the file is in RTF format.

    Nasser
     
    Nasser Abbasi, Dec 14, 2007
    #3
  4. Dave

    Dave Guest


    It definately was doing it yesterday. I even reversed the file using the
    UNIX 'tail' and read it in. But it seems OK now when I do it.

    I guess I should have closed it and started it again, but I'm 100% sure
    it was doing in in text mode (i.e. foo.txt)
     
    Dave, Dec 14, 2007
    #4
  5. Dave

    Dave Guest

    Whatever is causing this, it seems to be related to a notebook of mine.

    If I import this file

    aaa
    bbb
    cccc

    zzzzzzzz
    yyyyyyy
    xxxxxx

    22222222
    1111111
    33333333


    into a new notebook, there are 3 cells produced, with aaa, bbb and ccc
    in the first cell, zzzzzzzz, yyyyyyy and xxxxxx in the second cell and
    22222222, 1111111 and 33333333 in the 3rd cell.

    i.e. it looks as I expect.

    aaa
    bbb
    cccc

    zzzzzzzz
    yyyyyyy
    xxxxxx

    22222222
    1111111
    33333333

    BUT if I import the same file into a notebook that I have quite a bit of
    data in, it again gets read into 3 cells, but in this order:


    22222222
    1111111
    33333333

    zzzzzzzz
    yyyyyyy
    xxxxxx

    aaa
    bbb
    cccc


    i.e. the 3 cells are in reversed order to what I was expecting.

    I would post the notebook, but it is huge and has things I can't make
    public. But very consistanty the order of import is reversed.

    I will try to cut it down. If I can reproduce it in a size, I will email
    it to Wolfram.

    PS,
    I did not quit the kernel this time, so a new notebook on a kernel that
    has been used a lot does not induce the problem. It seems to be an old
    notebook on a fresh kernel does.
     
    Dave, Dec 14, 2007
    #5
  6. Yes, I've seen this too while trying it. One time it worked ok, I think it
    was when I restarted Mathematica or did something to the file, but I could
    not reporduce it. It still does it in reverse after that. I tried DOS, UNix
    and Mac format (I have SlickEdit which allows me to save in different file
    formats).

    Anyway, there is a bug here somewhere.

    Nasser
     
    Nasser Abbasi, Dec 14, 2007
    #6
  7. Dave

    Hans Guest

    I've seen this some times. Try closing this notebook, removing the
    CasheID, then reopening it. It has worked for me, but the problem is
    not always reporoducable, so I'm not sure if I just got lucky or not.

    Hans
     
    Hans, Dec 15, 2007
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.