= Struct = ''Part of'' TutorialFundamentals == Description == Structs allow you to bind together basic data types into a more complicated paradigm. == Example == {{{ #!d struct Vehicle { double cost; int wheels; } struct Utensil { bool pointy; bool tined; } void main() { Vehicle car; car.cost = 20_000; car.wheels = 4; Vehicle motorcycle; motorcycle.cost = 2_000; motorcycle.wheels = 2; Vehicle boat; boat.cost = 5_000; boat.wheels = 0; Utensil spoon; spoon.pointy = false; spoon.tined = false; Utensil fork; fork.pointy = true; fork.tined = true; Utensil knife; knife.pointy = true; knife.tined = false; } }}} == Source == Based on [http://jcc_7.tripod.com/d/tutor/simple/struct.html struct.html] by jcc7.