Explain what is slot and what are the most commonly used slot options?



Explain what is slot and what are the most commonly used slot options?..

Answer / chaitanya

Slots are nothing but variables that stores data or fields. A slot description has the form, where each option is a keyword followed by name, expression and other options.
The most commonly used slot options are:
• :accessor function-name
• :initform expression
• :initarg symbol

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AI Languages Interview Questions

Which exploit the fact that lisp forms are just expressions meant to be evaluated? a) List b) Procedure c) Macro d) None of the mentioned

1 Answers  


 Is it possible to call LISP functions from other languages?

1 Answers  


Mention why you have to use “is” instead of “=” in Prolog when it comes to applying calculation logic?

1 Answers  


 What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) * (setf (person-surname person-instance-1) ‘winston) a) Winston b) Nil c) T d) Error

1 Answers  


 What is the output of the following statement? * (setf breakfast ‘(eggs bacon toast tea)) * (cond ((> (length breakfast) 10) ‘glutton) ((not (endp breakfast)) ‘normal)(t ‘anorexic)) a) Anorexic b) Breakfast c) Eggs d) Normal

1 Answers  






 What is the process of reserving a place in computer memory to store a value for a symbol? a) Storing b) Ranging c) Binding d) None of the mentioned

1 Answers  


 How the clause is called if it contains a test, as well as zero or more additional forms in LISP? a) Conditional b) Consequents c) Clause d) None of the mentioned

1 Answers  


Pick out the correct statement about macro. a) Macro is dependant. b) Macro is interoperable c) Macro is complex d) Macro deserve their own file

1 Answers  


What is the output of the given statement in LISP? * (setf abc ‘(a b c) xyz ‘(x y z)) * abc a) A b) B c) ABC

1 Answers  


What is the output of the given statement? * (defstruct person (sex nil) (personality ‘nice)) * (setf person-instance-1 (make-person)) * (setf person-instance-2 (make-person :sex ‘female)) a) Person :sex female :personality nice b) Person :sex c) Sex:Female d) None of the mentioned

1 Answers  


 Which process helps to build large and complicated programs in LISP? a) Macros b) Procedure abstraction c) Defun d) None 

1 Answers  


 Explain why matching variable is important in Prolog? What is the method to match variables?

1 Answers  


Categories