Field (computer science)
In data hierarchy, a field (data field) is a variable in a record.[src] A record, also known as a data structure, allows logically related data to be identified by a single name.[src] Identifying related data as a single group is central to the construction of understandable computer programs.[src] The individual fields in a record may be accessed by name, just like any variable in a computer program.[src] Each field in a record has two components.[src] One component is the field's datatype declaration.[src] The other component is the field's identifier.[src]
In data hierarchy, a field (data field) is a variable in a record.[src] A record, also known as a data structure, allows logically related data to be identified by a single name.[src] Identifying related data as a single group is central to the construction of understandable computer programs.[src] The individual fields in a record may be accessed by name, just like any variable in a computer program.[src] Each field in a record has two components.[src] One component is the field's datatype declaration.[src] The other component is the field's identifier.[src] type PersonRecord = record lastName : array [ 1 ..[src] 20 ] of Char; firstName : array [ 1 ..[src] 20 ] of Char; age : Integer end; In Pascal, the identifier component precedes a colon, and the datatype component follows the colon.[src] Once a record is defined, variables of the record can be allocated.[src] Once the memory of the record is allocated, a field can be accessed like a variable by using the dot notation.[src] var alice : PersonRecord; alice.firstName := 'Alice'; Over time, the term field has been replaced with the terms data member and attribute.[src] The following Java class has three attributes: firstName, lastName, and age.[src] public class PersonRecord { private String firstName; private String lastName; private int age; } ==See also== ==References==[src]
22 sentences · 22 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Field (computer science)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/field-computer-science. Accessed 01 December 2026.
Chicago
"Field (computer science)." encyclopegia.org. Accessed December 1, 2026. https://encyclopegia.org/wiki/field-computer-science.
APA
encyclopegia.org. (2026). Field (computer science). Retrieved December 1, 2026, from https://encyclopegia.org/wiki/field-computer-science
Accessed December 1, 2026 · CC BY-SA 4.0 · citation page · JSON