Quiz time
Now that you have completed reading this chapter, try answering the following questions to test your knowledge:
- What does the following snippet do?
def;
This creates an empty record, and TableGen automatically assigns it a unique name.
See the The TableGen programming language and Defining multiple records at once sections.
- What would happen if we took the snippet featured in the Defining multiple records at once section and replaced the definition of the
ShippingPrice
class with the following snippet?class ShippingPrice<int arg> { int price = arg; }
We replaced the field named shippingPrice
with a field named price
. The new name now collides with the price
field of record A
. As a result, the value of record A
's price
will be overridden by the value of the price
field of the ShippingPrice
class.
See the The TableGen programming language section for more information.
- How...