sharpooth Posted May 4, 2010 Posted May 4, 2010 Hi Guys, I want to set a long list of elements in one variable (setq X (list .......... ......... )) and after compiling I am receiving the following message: ; warning: unsafe redefinition of LIST symbol, conflicts with long LIST translation: LIST Is there any restrictions about length of list? Thanks Quote
Lee Mac Posted May 4, 2010 Posted May 4, 2010 You haven't got (defun list ... Anywhere have you? Quote
sharpooth Posted May 5, 2010 Author Posted May 5, 2010 My code is: (defun SHS-CF-EN-list () (setq SHS-CF-EN ; (list "20x2x4" 20.00 2.00 4.00 2.00 1.05 1.34 0.69 0.72 0.69 0.88 1.21 1.06 0.073 "20x2.5x5" 20.00 2.50 5.00 2.50 1.25 1.59 0.77 0.69 0.77 1.00 1.39 1.19 0.071 "25x2x4" 25.00 2.00 4.00 2.00 1.36 1.74 1.48 0.92 1.19 1.47 2.53 1.80 0.093 "25x2.5x5" 25.00 2.50 5.00 2.50 1.64 2.09 1.69 0.90 1.35 1.71 2.97 2.07 0.091 "25x3x6" 25.00 3.00 6.00 3.00 1.89 2.41 1.84 0.87 1.47 1.91 3.33 2.27 0.090 "30x2x4" 30.00 2.00 4.00 2.00 1.68 2.14 2.72 1.13 1.81 2.21 4.54 2.75 0.113 "30x2.5x5" 30.00 2.50 5.00 2.50 2.03 2.59 3.16 1.10 2.10 2.61 5.40 3.20 0.111 "30x3x6" 30.00 3.00 6.00 3.00 2.36 3.01 3.50 1.08 2.34 2.96 6.15 3.58 0.110 "40x2x4" 40.00 2.00 4.00 2.00 2.31 2.94 6.94 1.54 3.47 4.13 11.30 5.23 0.153 "40x2.5x5" 40.00 2.50 5.00 2.50 2.82 3.59 8.22 1.51 4.11 4.97 13.60 6.21 0.151 ...................... and may more rows ) ) ) this list is very long. In process of compiling from Vlide I am receiving ; warning: unsafe redefinition of LIST symbol, conflicts with long LIST translation: LIST Quote
Kerry Brown Posted May 5, 2010 Posted May 5, 2010 You may be better making each member-section definition a list in the SHS-CF-EN list. .. 2 reasons reduce the elements in the SHS-CF-EN list allow an (assoc SHS-CF-EN ) to return the member data. What does (length SHS-CF-EN) return ?? Quote
sharpooth Posted May 5, 2010 Author Posted May 5, 2010 (length SHS-CF-EN) 474 there are - 474 elements Quote
Lee Mac Posted May 5, 2010 Posted May 5, 2010 474 isn't too many - I thought we were talking thousands... I'm not sure that the length would cause the problem... Quote
Kerry Brown Posted May 5, 2010 Posted May 5, 2010 (length SHS-CF-EN) 474 there are - 474 elements seems you have a few sizes that don't have 14 elements per item ... just an observation. I'd need to see the code, but I see no issue with the list length. Does it load and run correctly from the editor ? What compile mode are you using ? Quote
Kerry Brown Posted May 5, 2010 Posted May 5, 2010 I've just run a test. 255 element list compiles without warning a 256 element list generates a warning. Both loaded and ran as .LSP files from the IDE. The file compiled, loaded and ran correctly without error. [COMPILING K:/KDUBPro2010/xxxxx.lsp] ;;XXXX ; warning: unsafe redefinition of LIST symbol, conflicts with long LIST translation: LIST ; === STATISTICS: XXXX ; external globals are (MYLIST) ; function calls to be linked (LIST) ; not linked function calls (LENGTH) ; === STATISTICS: "K:/KDUBPro2010/xxxxx.lsp" ; not dropped function names (XXXX) Quote
sharpooth Posted May 5, 2010 Author Posted May 5, 2010 seems you have a few sizes that don't have 14 elements per item ... just an observation. I'd need to see the code, but I see no issue with the list length. Does it load and run correctly from the editor ? What compile mode are you using ? The program works correct. The compile mode is simple May be for correct compilation the max length of list is 256 elements?! Quote
Kerry Brown Posted May 5, 2010 Posted May 5, 2010 The program works correct.The compile mode is simple May be for correct compilation the max length of list is 256 elements?! LESS than 256 .... 'cause 256 generates a warning. Quote
Kerry Brown Posted May 5, 2010 Posted May 5, 2010 As I mentioned earlier, you may be best making a list of lists similar to ; (defun SHS-CF-EN-list () (setq SHS-CF-EN (list '("20x2x4" 20.00 2.00 4.00 2.00 1.05 1.34 0.69 0.72 0.69 0.88 1.21 1.06 0.073) '("20x2.5x5" 20.00 2.50 5.00 2.50 1.25 1.59 0.77 0.69 0.77 1.00 1.39 1.19 0.071) '("25x2x4" 25.00 2.00 4.00 2.00 1.36 1.74 1.48 0.92 1.19 1.47 2.53 1.80 0.093) '("25x2.5x5" 25.00 2.50 5.00 2.50 1.64 2.09 1.69 0.90 1.35 1.71 2.97 2.07 0.091) '("25x3x6" 25.00 3.00 6.00 3.00 1.89 2.41 1.84 0.87 1.47 1.91 3.33 2.27 0.090) '("30x2x4" 30.00 2.00 4.00 2.00 1.68 2.14 2.72 1.13 1.81 2.21 4.54 2.75 0.113) '("30x2.5x5" 30.00 2.50 5.00 2.50 2.03 2.59 3.16 1.10 2.10 2.61 5.40 3.20 0.111) '("30x3x6" 30.00 3.00 6.00 3.00 2.36 3.01 3.50 1.08 2.34 2.96 6.15 3.58 0.110) '("40x2x4" 40.00 2.00 4.00 2.00 2.31 2.94 6.94 1.54 3.47 4.13 11.30 5.23 0.153) '("40x2.5x5" 40.00 2.50 5.00 2.50 2.82 3.59 8.22 1.51 4.11 4.97 13.60 6.21 0.151) ;;...................... ;;and may more rows ) ) ;; < ... > ) Then extract the item you want ... (setq ItemList (assoc "30x2.5x5" SHS-CF-EN)) ;;-> ("30x2.5x5" 30.0 2.5 5.0 2.5 2.03 2.59 3.16 1.1 2.1 2.61 5.4 3.2 0.111) Quote
devitg Posted May 11, 2010 Posted May 11, 2010 Hi, I had the same warning error , with a 10000 + sublist in a list . Seem to be it is a limit from ACAD , like you can not have more than 256 selections sets. Quote
devitg Posted May 12, 2010 Posted May 12, 2010 Is the routine working well? Yes, it do . Thanks Quote
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.
Note: Your post will require moderator approval before it will be visible.