Continue lisp code in a new line

Continue lisp code in a new line

isosa9APBT
Advocate Advocate
3,099 Views
8 Replies
Message 1 of 9

Continue lisp code in a new line

isosa9APBT
Advocate
Advocate

I been doing lisp routines for a while but I never been able to figure out how to continue the lisp line in a new line. My list routines get very long and I need to break them in multiple lines without messing up the code. I been searching for a while but have not been able to find anything. Any help is appreciated.

0 Likes
Accepted solutions (1)
3,100 Views
8 Replies
Replies (8)
Message 2 of 9

pbejse
Mentor
Mentor

@isosa9APBT wrote:

I been doing lisp routines for a while but I never been able to figure out how to continue the lisp line in a new line. My list routines get very long and I need to break them in multiple lines without messing up the code. I been searching for a while but have not been able to find anything. Any help is appreciated.


What do you mean by "new line" isosa9APBT? Have you been writing your lisp code in notepad ?  Try VLIDE [ is this is what I think this topic is about ]

 

command: VLIDE or simply VL

 

[  IMAGE DELETED  ] silly me Smiley Very Happy or Am I?

 

EDIT: Now I'm not so sure whats going on. sigh...

Message 3 of 9

isosa9APBT
Advocate
Advocate

I mean a new line as in 

 

assdfgkgkkhkhkhigjfhn

 

and break it into 

 

assdfgkgkk

hkhkhigjfhn

 

Instead of having one long line I rather break it into two short  lines of code. Do I just break it normally and CAD will be able to tell that the command continues in the next line below? Are there any special characters that I have to use to let CAD know what's happening?

0 Likes
Message 4 of 9

cadffm
Consultant
Consultant

You can break your Line whereever you want, some Tips for that and other things:

http://people.ace.ed.ac.uk/staff/medward2/class/moz/cm/doc/contrib/lispstyle.html

 

In VLide, CTRL+ALT+F start the automatic formatting feature (menu Tools)

Isn't 100% my style, but it´s ok.

 

Or I did not understand the question 😉

Sebastian

Message 5 of 9

cadffm
Consultant
Consultant
Accepted solution

Code: No matter where the line breaks are

---

(setq a 1 b 2 c 3)

---

(setq a

1

b 2

c

 

3)

---

 

String: Use STRCAT

 

"1234567890"

 

(strcat "1234"

          "567890"

)

 

Or if we wrong again, please explain...

Sebastian

Message 6 of 9

pbejse
Mentor
Mentor

@cadffm wrote:

 

 

Or if we wrong again, please explain...


white flag.jpg I gave up 3 posts ago Smiley Very Happy

0 Likes
Message 7 of 9

pbejse
Mentor
Mentor

@isosa9APBT wrote:

 

 

Do I just break it normally and CAD will be able to tell that the command continues in the next line below? Are there any special characters that I have to use to let CAD know what's happening?


Parenthesis is your friend. Just try using VLIDE isosa9APBT, go ahead.... just try   Smiley Happy

 

Kudos to cadffm  for shedding light on this.  -->  The code posted on this discussion

 

 

 

0 Likes
Message 8 of 9

Ranjit_Singh
Advisor
Advisor

@isosa9APBT wrote:

..... 

Instead of having one long line I rather break it into two short  lines of code. Do I just break it normally and CAD will be able to tell that the command continues in the next line below? Are there any special characters that I have to use to let CAD know what's happening?


Looks like you are working at the prompt and not at VLIDE. Use parenthesisLong_string.gif

0 Likes
Message 9 of 9

pbejse
Mentor
Mentor

Ranjit.Singh wrote:

 

Looks like you are working at the prompt and not at VLIDE. Use parenthesis... [ gif ]


You and your animated GIF is worth a thousand words. Smiley Happy

 

Cheers