diff options
author | svenk177 <50141814+svenk177@users.noreply.github.com> | 2019-06-18 00:15:13 +0200 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-06-18 00:15:13 +0200 |
commit | e635141d5bc66f056c90bcc9da5fdd766610492f (patch) | |
tree | b69da4d3b4d2e6e592083a2c31c6d7f809666575 /docs/source/Schemas.md | |
parent | 0d2cebccfeffae9df998f3ac819bf17b7ec7a6d0 (diff) | |
download | flatbuffers-e635141d5bc66f056c90bcc9da5fdd766610492f.tar.gz flatbuffers-e635141d5bc66f056c90bcc9da5fdd766610492f.tar.bz2 flatbuffers-e635141d5bc66f056c90bcc9da5fdd766610492f.zip |
Add support for fixed-size arrays (#5313)
Diffstat (limited to 'docs/source/Schemas.md')
-rw-r--r-- | docs/source/Schemas.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/source/Schemas.md b/docs/source/Schemas.md index 4f7bd728..58bedae6 100644 --- a/docs/source/Schemas.md +++ b/docs/source/Schemas.md @@ -114,6 +114,27 @@ of same-size data where a `reinterpret_cast` would give you a desirable result, e.g. you could change a `uint` to an `int` if no values in current data use the high bit yet. +### Arrays + +Arrays are a convenience short-hand for a fixed-length collection of elements. +Arrays can be used to replace the following schema: + + struct Vec3 { + x:float; + y:float; + z:float; + } + +with the following schema: + + struct Vec3 { + v:[float:3]; + } + +Both representations are binary equivalent. + +Arrays are currently only supported in a `struct`. + ### (Default) Values Values are a sequence of digits. Values may be optionally followed by a decimal |