Example Brick new 015

 

 

Description

The first example shows the new function create a Brick with specified number of rows and fields. The second example shows the new function create a new instance of the brick object by making a copy of the original Brick.

 

Details

Create a new Brick, named Contestant, and give it ten rows each containing two fields. The second field repeats 20 times (in each row).

(setq Contestant (new Brick: 10 Name:Object:1 Score:Number:20)) Returns: #<Record 123456>

Create a new Brick, named Employee, and give it one row containing two fields.

(setq Employee (new Brick: Name:Character:40 Salary:Number:1)) Returns: #<Record 234567>

Create a new Brick, which is a copy of the Employee brick.

(setq Manager (new Brick: Employee)) Returns: #<Record 345678>

 

Related Examples

Here are examples of the new function at work.

BitVector new 013 Brick new 015 ByteVector new 015 CpxVector new 015
Dictionary new 004 Directory new 005 Directory new 006 FltVector new 009
IntVector new 010 Lambda new 001 Lambda new 002 Lambda new 003
Matrix new 009 Matrix new 010 NumMatrix new 015 NumVector new 011
ObjVector new 012 ObjectRepository new 014 PcodeVector new 014 ShortVector new 011
String new 001 Structure new 003 Symbol new 002 Vector new 007
Vector new 008

 

Function Links

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

new

Here are a number of links to other related functions.

defmethod(#void) new(#void) copy(#void)

 

Argument Types

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

Brick

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

Brick addMethod 008 Brick cdr 010 Brick compare 019 Brick compareEQ 019
Brick compareGT 019 Brick compareLE 019 Brick compareLT 019 Brick compareNE 019
Brick comparison 019 Brick copy 012 Brick defmethod 025 Brick isAtom 011
Brick isEqual 018 Brick isIdentical 020 Brick isObject 014 Brick isType 022
Brick length 017 Brick methodsOf 024 Brick new 015 Brick ref 036
Brick send 027 Brick setCdr 014 Brick setq 029 Brick setq 28
Brick sizeof 029 Brick type 026

Analytic Information Server (AIS)

AIS Component Systems

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