Struct: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>JulienDethurens
No edit summary
>JulienDethurens
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A '''Struct''' or '''Data Structure''' is a special Data Type. It is a collection of several properties rolled into one property.  
A '''Struct''' or '''Data Structure''' is a special Data Type. It is a collection of several properties rolled into one property.  


{{LeftNoticeStart}}Data Structures are a kind of very simple object that only has properties. This is combined to act as one large property, which is then used in an object.
Data Structures are a kind of very simple object that only has properties. This is combined to act as one large property, which is then used in an object.


For example, the [[ResizeableFaces (Property)|ResizeableFaces]] property uses a Struct named [[Faces (Struct)|Faces]]. This Struct includes six [[Bool]] values.
For example, the [[ResizeableFaces (Property)|ResizeableFaces]] property uses a Struct named [[Faces (Struct)|Faces]]. This Struct includes six [[Bool]] values.
Line 14: Line 14:
****StructProperty
****StructProperty
****StructProperty
****StructProperty
|}




Data Structures can use any type of other Data Type, [[Bool]], [[Int]], any of them.
Data Structures can use any type of other Data Type, [[Bool]], [[Int]], any of them.
== See also ==
Common Data Structures used in computer programming:
* [[Stack]]
* [[Tables#Arrays|Arrays]]
* [[Linked lists]]
[[Category:Data types]]
[[Category:Data types]]

Latest revision as of 00:39, 17 April 2012

A Struct or Data Structure is a special Data Type. It is a collection of several properties rolled into one property.

Data Structures are a kind of very simple object that only has properties. This is combined to act as one large property, which is then used in an object.

For example, the ResizeableFaces property uses a Struct named Faces. This Struct includes six Bool values.

So Structs are just collections of smaller properties, which are used as one big property.

  • Object
    • Some Property
    • Other Property
    • Property
      • Struct
        • StructProperty
        • StructProperty


Data Structures can use any type of other Data Type, Bool, Int, any of them.

See also

Common Data Structures used in computer programming: