lisp programming
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
lisp programming

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
terri
Guest





Posted: Tue Sep 27, 2005 4:10 pm    Post subject: lisp programming Reply with quote

Hello! I am trying to learn lisp programming. My goal is to open a
file and parse the line for comments. The comments syntax is
/*comments*/. I can open a file with the command
with-open-file, but I don't know how to parse a line. Would anyone be
able to help me with some code to do this? Thanks!

Back to top
CarlB



Joined: 27 Sep 2005
Posts: 52

Posted: Tue Sep 27, 2005 10:49 pm    Post subject: re:lisp programming Reply with quote

If the line begins and ends with "\*", you can get the string in between with (vl-string-trim "\*" Stringname) If there can be random characters before the "\*", you'll have to step through each character with "substr", find the positions of the "*", then again use "substr" from 1st to 2nd position to get the "between" string.
Back to top
View user's profile Send private message
Ben Gun
Guest





Posted: Wed Sep 28, 2005 4:10 pm    Post subject: Re: lisp programming Reply with quote

I have to admit I don't understand the structure of your file.

On 27 Sep 2005 05:27:26 -0700, "terri" <twrazel@uark.edu> wrote:

Quote:
Hello! I am trying to learn lisp programming. My goal is to open a
file and parse the line for comments. The comments syntax is
/*comments*/. I can open a file with the command
with-open-file, but I don't know how to parse a line. Would anyone be
able to help me with some code to do this? Thanks!


Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB