ILoveMadoka Posted December 19, 2018 Share Posted December 19, 2018 I have an acad.lsp file that I have been adding to for over 20 years and it has started giving me issues. I did a search and found that there are 2 parenthesis missing. I found that there were: ( = 10776 ) = 10774 So two closing parenthesis are missing. There are 8200 lines in the complete file. I was looking in the VLIDE and there is a parenthesis matching but going paren by paren is going to take forever. Once upon a time if a closing paren was missing you'd get a (_> type prompt. That is not happening. The last routine in the file has a "Loaded" prompt which does appear but a couple of the older routines don't work correctly now. Is there a better way to find where the missing parenthesis should be? I'd prefer to NOT upload the entire file if possible. I'd like to be able to solve this myself (with some direction on how to accomplish this) Please advise.. Quote Link to comment Share on other sites More sharing options...
rlx Posted December 19, 2018 Share Posted December 19, 2018 8200 lines isn't small but manageable although I would recommend to go on a diet and demand-load some of your functions (if (not (c:...)(load "...")) Anyways , you could double click at the beginning of each defun or just cut-copy-paste half of your file in a blanc document in de vlisp editor and run check on that file to see in which half the error is. Quote Link to comment Share on other sites More sharing options...
Grrr Posted December 19, 2018 Share Posted December 19, 2018 This thread might be of interest ( I like the advice @marko_ribar gave me). Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted December 19, 2018 Share Posted December 19, 2018 If a princ statement at the end of the file displays correctly, parentheses must match. Note that parentheses can be used in strings and comments so counting occurrences of '(' and ')' is not the right way to diagnose the problem. Of course parentheses can be misplaced... Quote Link to comment Share on other sites More sharing options...
ILoveMadoka Posted December 19, 2018 Author Share Posted December 19, 2018 Thanks.. I was able to isolate the two offending routines. Everything is working great now. I appreciate it.. Seems I remember years ago a program you could paste your code into and it would show you that a closing paren was missing and show you where it should be... That was long ago though... Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted December 21, 2018 Share Posted December 21, 2018 On 12/19/2018 at 11:19 PM, ILoveMadoka said: Seems I remember years ago a program you could paste your code into and it would show you that a closing paren was missing and show you where it should be... That was long ago though... Did you try Notepad++ ? It has nice Highlighting feature. FWIW, in VLIDE I tend to use 'Ctrl+M' to locate/select matched parentheses Quote Link to comment Share on other sites More sharing options...
BIGAL Posted December 22, 2018 Share Posted December 22, 2018 Search fo chkbrk.lsp an old one of mine. Quote Link to comment Share on other sites More sharing options...
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.