ddlx 4 Posted May 29, 2013 Report Share Posted May 29, 2013 Hi all Got a proble with $subtract lists : I have a list A : abcde I have a list b : bcd i want a list C = listA - listB ae so i use $subtract lists here is my code : clear list(%listA)clear list(%listB)clear list(%listC)add item to list(%listA, $list from file("{$special folder("Application")}\\listA.txt"), "Delete", "Global")add item to list(%listB, $list from file("{$special folder("Application")}\\listB.txt"), "Delete", "Global")add item to list(%listC, $subtract lists(%listA, %listB), "Delete", "Global")set(#listC, %listC, "Global") Strangely the ListC = abcde Is this normal ? Quote Link to post Share on other sites
UBotDev 276 Posted May 30, 2013 Report Share Posted May 30, 2013 You should use command "add itemS to list" instead of "add item to list"! "add item" only adds one item, so in your case every list had one item, and all were different...so UBot returned the ListC which was correct behaviour for your code. Here is a quick example: clear list(%A) clear list(% clear list(%C) add list to list(%A, $list from text("a b c d e", $new line), "Delete", "Global") add list to list(%B, $list from text("b c d", $new line), "Delete", "Global") add list to list(%B, $list from text("b c d", $new line), "Delete", "Global") add list to list(%C, $subtract lists(%A, %, "Delete", "Global") Quote Link to post Share on other sites
ddlx 4 Posted June 9, 2013 Author Report Share Posted June 9, 2013 Hum, ok i see Will try this Thank's for help Quote Link to post Share on other sites
blumi40 222 Posted June 9, 2013 Report Share Posted June 9, 2013 $subtract listsonly works with small listsi was try that many times with liste around 1k and this was never working for me Quote Link to post Share on other sites
Security 17 Posted June 9, 2013 Report Share Posted June 9, 2013 $subtract listsonly works with small listsi was try that many times with liste around 1k and this was never working for me I have used the subtract feature / command on lists 30/40k +. It takes a while but it preforms the action. Quote Link to post Share on other sites
UBotDev 276 Posted June 9, 2013 Report Share Posted June 9, 2013 It also works well for me (at least I didn't have problems till today). Quote Link to post Share on other sites
blumi40 222 Posted June 10, 2013 Report Share Posted June 10, 2013 my last project i was try to use it wasnt work for me 4.2.16 maybe is a versionbug who knows Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.