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>
|
Displays contents of the first Brick field on the first row and first repeat. In this example the Name field as
a set Vector value.
(ref Contestant[0 0 0]) |
Returns: #<Vector 123456>
|
Displays contents of the first Brick field on the first row and first repeat. This example uses a symbol(Name:) instead of an integer index.
(ref Contestant[Name: 0 0]) |
Returns: #<Vector 123456>
|
Displays the Brick content returned by any of the previous two examples.
(display #<Vector 123456> ) |
Returns: #("Anna Smith" )
|
Displays contents of the second Brick field on the first row and first repeat.
(ref Contestant[1 0 0]) |
Returns: 100.0
|
Displays contents of the second Brick field on the first row and first repeat. This example uses a symbol(Score:) instead of an integer index.
(ref Contestant[Score: 0 0]) |
Returns: 100.0
|
Displays contents of the second Brick field on the first row and second repeat.
(ref Contestant[Score: 1 0]) |
Returns: 100.0
|
Displays contents of the second Brick field on the second row and first repeat.
(ref Contestant[Score: 0 1]) |
Returns: 100.0
|
Displays contents of the second Brick field on the third row and second repeat.
(ref Contestant[Score: 1 2]) |
Returns: 75.0
|