Template:Struct field
(Redirected from Template:Field)
This is one of three helper templates for displaying struct fields on a data structure article. They are:
- {{Struct top}}
- {{Struct field}}
- {{Struct bottom}}
They must always be used together to build a full table.
Usage
{{Struct top}} {{Struct field|offset|size|type|name|description}} {{Struct field|offset|size|type|name|description}} ... {{Struct bottom}}
Example
{{Struct top}} {{Struct field|0x4|0x4|float|gMin|Lower bound}} {{Struct field|0x8|0x4|float|gMax|Upper bound}} {{Struct field|0xC|0x4|float|u4ag|}} {{Struct bottom}}
Offset | Size | Type | Name | Notes |
---|---|---|---|---|
0x4 | 0x4 | float
|
gMin
|
Lower bound |
0x8 | 0x4 | float
|
gMax
|
Upper bound |
0xC | 0x4 | float
|
u4ag
|
{{Struct top|notes=no}} {{Struct field|0x4|0x4|float|gMin}} {{Struct field|0x8|0x4|float|gMax}} {{Struct field|0xC|0x4|float|u4ag}} {{Struct bottom}}
Offset | Size | Type | Name |
---|---|---|---|
0x4 | 0x4 | float
|
gMin
|
0x8 | 0x4 | float
|
gMax
|
0xC | 0x4 | float
|
u4ag
|
Template data
This is the TemplateData documentation for this template used by VisualEditor and other tools.
TemplateData for Struct field
A template for rows in the {{tl|Struct}} template
Parameter | Description | Type | Status | |
---|---|---|---|---|
offset | offset 1 | Offset into the struct in bytes | Number | suggested |
size | size 2 | Size of the field in bytes | Number | suggested |
type | type 3 | The data type of the field
| String | suggested |
name | name 4 | The name of the field | String | suggested |
notes | notes 5 | Any description or notes about the field | String | suggested |
description | description | no description | String | deprecated |
See also
- {{Struct top}}
- {{Struct bottom}}
- {{Enum value}}