Example Brick setq 28

 

 

Description

These examples show the setq function set a value to the Brick field. The syntax for setting is as follows: setq RecordName[ Column Repeat Row ]

 

Details

Create a new Brick, named Contestant, and give it 5 Rows each containing two Columns(Name and Score). The second column(Score) repeats 20 times for each row.

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

Sets the value of the Name field as a Vector for the first row's first repeat.

(setq Contestant[0 0 0] #("Anna Smith")) Returns: #<Record 123456>

Sets the value of the Name field as a Vector for the second row.

(setq Contestant[0 0 1] #("John Doe")) Returns: #<Record 123456>

Sets the value of the Name field as a Vector for the third row. This example uses a symbol(Name:) instead of an integer index

(setq Contestant[Name: 0 2] #("Jane Baker")) Returns: #<Record 123456>

Sets the value of the Score field for the first row and first repeat as 100.0.

(setq Contestant[1 0 0] 100.0) Returns: #<Record 123456>

Sets the value of the Score field for the first row and second repeat as 99.0.

(setq Contestant[1 1 0] 99.0) Returns: #<Record 123456>

Sets the value of the Score field for the second row and first repeat as 99.0.

(setq Contestant[1 0 1] 99.0) Returns: #<Record 123456>

Sets the value of the Score field for the second row and second repeat as 100.0.

(setq Contestant[1 1 1] 100.0) Returns: #<Record 123456>

Sets the value of the Score field for the third row and first repeat as 75.0. This example uses a symbol(Score:) instead of an integer index.

(setq Contestant[Score: 0 2] 75.0) Returns: #<Record 123456>

Sets the value of the Score field for the third row and second repeat as 75.0. This example uses a symbol(Score:) instead of an integer index.

(setq Contestant[Score: 1 2] 75.0) Returns: #<Record 123456>

 

Related Examples

Here are examples of the setq function at work.

BitVector setq 024 Boolean setq 016 Brick setq 029 Brick setq 28
Character setq 017 Date setq 019 Dictionary setq 007 Dictionary setq 008
Dictionary setq 009 Directory setq 010 Directory setq 011 FltVector setq 019
IntVector setq 020 List setq 025 List setq 026 Matrix setq 014
NumVector setq 021 Number setq 018 ObjVector setq 022 ObjectRepository setq 027
PcodeVector setq 023 ShortVector setq 021 String setq 001 Structure setq 003
Structure setq 004 Structure setq 005 Structure setq 006 Symbol setq 001
Symbol setq 002 Vector setq 012 Vector setq 013 Void setq 015

 

Function Links

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

setq

Here are a number of links to other related functions.

ref(Brick)

 

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

How do I contact the AIS Server team?

You can always talk with the AIS at aiserver.sourceforge.net.