User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Legacy and Other Languages section within the Software Development category of DaniWeb, a massive community of 403,387 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,535 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Legacy and Other Languages advertiser: Programming Forums
Views: 636 | Replies: 1
Reply
Join Date: Apr 2008
Posts: 1
Reputation: lastcylon is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
lastcylon lastcylon is offline Offline
Newbie Poster

lisp- type checking?

  #1  
Apr 3rd, 2008
hi, i was wondering if there are functions in lisp that lets me check if an object or defstruct object is certtain defstruct object

as if
if i have

(defstruct (firstthing (:conc-name nil)) first second)
(defstruct (somethingelse (:conc-name nil)) blah blah)

and i instanciated

(setf thing (make-firstthing :first '(a) :second '(b)))

how do i check if thing is an instance of firstthing or somethingelse?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: Birmingham, AL
Posts: 33
Reputation: azimuth0 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 5
azimuth0 azimuth0 is offline Offline
Light Poster

Re: lisp- type checking?

  #2  
Apr 4th, 2008
(typep thing 'first) will do what you want.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Legacy and Other Languages Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Legacy and Other Languages Forum

All times are GMT -4. The time now is 9:29 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC