Search found 26 matches
- Mon Aug 13, 2012 1:49 am
- Forum: Common Lisp
- Topic: printing Struct
- Replies: 5
- Views: 8814
Re: printing Struct
Hi again, I have another problem about struct now, For example if I have a variable contains this : #S(ini__trs_0__call_0_0 :k 0 :b #(#(1 2 3) 3) :cs #S(ini___1 :a #(#(1 2 3) 3)) :st #<Function (internal step_0 0)> :fi #<Function (internal final 0)>) and I want to retrive each eelment of the struct,...
- Fri Jul 27, 2012 1:17 am
- Forum: Common Lisp
- Topic: printing Struct
- Replies: 5
- Views: 8814
printing Struct
Hi,
How can I print the struct without #s ?
For example my result is #S(U) and I just want to print U. How can I do that !?
How can I print the struct without #s ?
For example my result is #S(U) and I just want to print U. How can I do that !?
- Fri Jul 13, 2012 1:05 am
- Forum: Common Lisp
- Topic: global variable
- Replies: 3
- Views: 7445
global variable
Hi,
Can we define global variable in lisp !? If we have it in lisp, how we can define it ?
Can we define global variable in lisp !? If we have it in lisp, how we can define it ?
- Thu Jul 05, 2012 6:39 am
- Forum: Common Lisp
- Topic: get parameters name of a function
- Replies: 3
- Views: 5750
get parameters name of a function
Is there any function that gets the name of the function and returns the name of the parameters ?
For example I have a function like this :
(defun test (m n))
I want to get m and n. But I don't want the value of the n and m, Just the name of the parameter "m" and "n".
For example I have a function like this :
(defun test (m n))
I want to get m and n. But I don't want the value of the n and m, Just the name of the parameter "m" and "n".
- Thu Jul 05, 2012 6:22 am
- Forum: Common Lisp
- Topic: OR between list elements
- Replies: 13
- Views: 21092
Re: OR between list elements
yes. My bad. I used or besides identity. Now it works.
Thanks in advance.
Thanks in advance.
- Thu Jul 05, 2012 2:05 am
- Forum: Common Lisp
- Topic: OR between list elements
- Replies: 13
- Views: 21092
Re: OR between list elements
No problem. But I just started to program in lisp less that 2 week ago so I don't know even the simple syntax. Remind yourself when you started to program in lisp. ;) I also search for everything that I need but I put my question here for the best solution. Now I define the function for what I need ...
- Thu Jul 05, 2012 1:03 am
- Forum: Common Lisp
- Topic: OR between list elements
- Replies: 13
- Views: 21092
Re: OR between list elements
No , it is not the homework assignment, I explained the problem again because you asked me to explain. So I thought you didn't get what I mean. I tried the first solution that he sujjested but it didn't work. I didn't try the second one yet ! It is a part of the project so I need to "OR" t...
- Thu Jul 05, 2012 12:14 am
- Forum: Common Lisp
- Topic: OR between list elements
- Replies: 13
- Views: 21092
Re: OR between list elements
I just want to use "OR" operation between the element of the list. something like this (OR (nil , t , t, nil)) So the return value in this example should be t because nil OR t OR t OR nil is t.
- Wed Jul 04, 2012 5:10 am
- Forum: Common Lisp
- Topic: OR between list elements
- Replies: 13
- Views: 21092
Re: OR between list elements
So what can I do now !?
- Wed Jul 04, 2012 4:52 am
- Forum: Common Lisp
- Topic: OR between list elements
- Replies: 13
- Views: 21092
Re: OR between list elements
Thank you for the answer. I still have problem because for exapmle when I use (some #'or (list 0 1)) or I use reduce besides "some". It gives me an error : rror: or names a macro -- bad arg for function. It works fine with "*" or other operation but it doesn't work with "or&...