SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5

Thread: List Preappend

  1. #1
    Advanced Member
    Join Date
    Mar 2002
    Location
    Earth, USA, New York, Western
    Posts
    759
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    List Preappend

    Hi All,
    I need to add part three before part two and before part one. I need list preappend but there is not one.

    Can you help?
    Bruce.

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: List Preappend

    "Add" them...

    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">main ()
    {
    list of string ls1 = {&quot;c&quot;};
    ls1 = [list of string]{&quot;b&quot;} + ls1 ;
    print (ls1) ;
    ls1 = [list of string]{&quot;a&quot;} + ls1 ;
    print (ls1) ;
    }</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">John

  3. #3
    Senior Member
    Join Date
    Sep 2003
    Location
    Mission, KS
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: List Preappend

    Why not use ListInsert with an index of 1? That'll put the item at the beginning of the list.

    Dana

  4. #4
    Advanced Member
    Join Date
    Mar 2002
    Location
    Earth, USA, New York, Western
    Posts
    759
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: List Preappend

    I did
    [ ] ListInsert(lrPAccountDataHist, 1, rPAccountDataHist)

    But that also flipped the first list that was there?
    This was the append, and I need the next group of 8 (in this case only one line) to be inserted at the top.
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[ ] {1040224, DEPOSIT, 1003, 5983600+, C, 42126813-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 11300+, D, 48110413-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 11300+, D, 48099113-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 982500+, D, 48087813-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 52952900+, D, 47105313-, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 96500+, C, 5847587+, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 5249800+, C, 5751087+, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 500000+, C, 501287+, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 549+, C, 42126264-, NULL, NULL}</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">But this is what I get..... The whole list is flipped from bottom to top. I also don't know where the NULL came from?
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[ ] {1040224, DEPOSIT, 1003, 549+, C, 42126264-, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 500000+, C, 501287+, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 5249800+, C, 5751087+, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 96500+, C, 5847587+, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 52952900+, D, 47105313-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 982500+, D, 48087813-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 11300+, D, 48099113-, NULL, NULL}
    [ ] {1040224, CHECK PAID, 1051, 11300+, D, 48110413-, NULL, NULL}
    [ ] {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
    [ ] {1040224, DEPOSIT, 1003, 5983600+, C, 42126813-, NULL, NULL}</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">I need to insert and leave the list alone.
    The Fill Code
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[-] if blsEmpty == TRUE
    [ ] rPAccountDataHist = lsPAccountDataHist
    [ ] ListAppend(lrPAccountDataHist, rPAccountDataHist)
    [ ] lsPAccountDataHist = {}
    [ ] blsEmpty = FALSE
    [-] if blsEmpty == FALSE
    [ ] rPAccountDataHist = lsPAccountDataHist
    [ ] ListInsert(lrPAccountDataHist, 1, rPAccountDataHist)
    [ ] lsPAccountDataHist = {}</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">

  5. #5
    Advanced Member
    Join Date
    Mar 2002
    Location
    Earth, USA, New York, Western
    Posts
    759
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: List Preappend

    I think I know what happend,
    I'll let you know.....

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:53 AM.

Copyright BetaSoft Inc.