So let's suggest you have some object with such properties (Legs=4, Fur=True, Tail=True, Attitude=100). In a global it will looks something like this
^MyPets("Cat")=$lb(4,1,1,100)And in this case, we should have any pointer block in anyway, and while we don't have so many data in our global, yet. Type for pointer block will be 70
Block Repair Function (Current Block 3): 44 Block # 44 Type: 70 TOP/BOTTOM POINTER Link Block: 0 Offset: 40 Count of Nodes: 1 Collate: 5 --more-- # Node POINTER 1 ^MyPets 78
But we also have not so big value for our object, and data block can store subscripts in this block, as well as a value.
Block Repair Function (Current Block 44): 78
Block # 78 Type: 8 DATA
Link Block: 0 Offset: 60
Count of Nodes: 2 Collate: 5 Big String Nodes: 0
Pointer Length:6 Next Pointer Length:0 Diff Byte:Hex 0
Pointer Reference: ^MyPets
Next Pointer Reference:
Next pointer stored? No
--more--
# Node Data
1 ^MyPets
2 ^MyPets("Cat") $lb(4,1,1,100)
Or our global could be looks a bit different
^MyPets("Cat","Attitude")=100
^MyPets("Cat","Fur")=1
^MyPets("Cat","Legs")=4
^MyPets("Cat","Tail")=1But change nothing.
Block Repair Function (Current Block 44): 78
Block # 78 Type: 8 DATA
Link Block: 0 Offset: 108
Count of Nodes: 5 Collate: 5 Big String Nodes: 0
Pointer Length:6 Next Pointer Length:0 Diff Byte:Hex 0
Pointer Reference: ^MyPets
Next Pointer Reference:
Next pointer stored? No
--more--
# Node Data
1 ^MyPets
2 ^MyPets("Cat","Attitude") 100 *
3 ^MyPets("Cat","Fur") 1 *
4 ^MyPets("Cat","Legs") 4 *
5 ^MyPets("Cat","Tail") 1 *
So, we can see that yes, our subscripts now stores only in data block, yes it is, but they represent here as a nodes, and could be named as branches in a tree, we still have to store data in a data block, but we also need to store information about global, that's why we can see it here. And when will get more data than could be stored in one block, this block will be splitted, and in a parent block will see two nodes, for first nodes in a children blocks.
- Log in to post comments