Example Directory cdr 004

 

 

Description

This example shows that the tail key-binding value of a Directory must first be defined before it can be accessed by the cdr function. If no tail value is defined, then the cdr function returns #void.

 

Details

(define ClassRec #{dir|Bldg: 200 Room: 34 Period: 1 } ) Returns: #<Directory 188141>

The tail value of the ClassRec Directory is defined.

(setCdr ClassRec #{dic| Teacher: "Smith" Subject: "Math" }) Returns: none
(display ClassRec) Returns: (#{dir| Bldg: 200 Room: 34 Period: 1 } . #{dir| Teacher: "Smith" Subject: "Math" })

Displays only the tail value of the ClassRec Directory.

(display (cdr ClassRec)) Returns: #{dir| Teacher: "Smith" Subject: "Math" }

Displays only the length ClassRec Directory. The cdr value is not included.

(length ClassRec) Returns: 3

Notes and Hints

The cdr is not reachable by the [] operator.

 

Related Examples

Here are examples of the cdr function at work.

BitVector cdr 010 Brick cdr 010 CpxVector cdr 011 Dictionary cdr 003
Directory cdr 004 FltVector cdr 006 IntVector cdr 007 List cdr 009
Matrix cdr 007 Matrix cdr 008 NumMatrix cdr 011 NumVector cdr 008
ObjVector cdr 009 ShortVector cdr 008 Structure cdr 001 Structure cdr 002
Vector cdr 005 Vector cdr 006

 

Function Links

Here is the link to the current function used in this example.

cdr

Here are a number of links to other related functions.

ref(#void) refValues(#void) refAttributes(#void) setCdr(#void)

 

Argument Types

Here are the links to the data types of the arguments used in this example.

Directory

Here are a number of links to examples having similar argument types.

Dictionary isDictionary 001 Directory addMethod 006 Directory cdr 004 Directory compare 005
Directory compareEQ 005 Directory compareGE 005 Directory compareGT 005 Directory compareLE 005
Directory compareLT 005 Directory compareNE 005 Directory comparison functions 005 Directory copy 003
Directory count 003 Directory defMethod 007 Directory delete 005 Directory delete 006
Directory insert 003 Directory inside 003 Directory isAtom 003 Directory isBound 003
Directory isDirectory 001 Directory isEqual 003 Directory isIdentical 003 Directory isObject 005
Directory isType 007 Directory length 006 Directory map 003 Directory mapc 003
Directory member 002 Directory member 003 Directory methodsOf 008 Directory new 005
Directory new 006 Directory objectToDirectory 001 Directory objectToDirectory 002 Directory objectToDirectory 003
Directory objectToDirectory 004 Directory ref 010 Directory ref 011 Directory ref 012
Directory refAttributes 003 Directory refValues 003 Directory remove 003 Directory resize 003
Directory send 005 Directory setAttributes 003 Directory setCdr 003 Directory setq 010
Directory setq 011 Directory sizeof 005 Directory sort 007 Directory sort 008
Directory sort 009 Directory type 008 Directory vectorDelete 001 ObjectRepository loadRepository 001
String isChar 001 String isCharAlphabetic 001 String isCharAlphanumeric 001 String isCharLowercase 001
String isCharName 001 String isCharNumeric 001 String isCharUppercase 001 String isCharWhitespace 001
String isEqual 001 String isEqual 002 String isObject 001 String isString 001
String isText 001 String isType 001 String isType 002 String isType 003
String parse 001 String sizeof 001 String type 001 Symbol isCharName 002
Symbol isCharNumeric 002 Symbol isObject 002 Symbol isSymbol 001 Symbol isType 004
Symbol sizeof 002 Symbol type 002

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE