{"action":"created","issue":{"url":"https://api.github.com/repos/ForthHub/discussion/issues/20","labels_url":"https://api.github.com/repos/ForthHub/discussion/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/ForthHub/discussion/issues/20/comments","events_url":"https://api.github.com/repos/ForthHub/discussion/issues/20/events","html_url":"https://github.com/ForthHub/discussion/issues/20","id":124302616,"number":20,"title":"How do you do struct packing in FORTH?","user":{"login":"RickCarlino","id":1388608,"avatar_url":"https://avatars.githubusercontent.com/u/1388608?v=3","gravatar_id":"","url":"https://api.github.com/users/RickCarlino","html_url":"https://github.com/RickCarlino","followers_url":"https://api.github.com/users/RickCarlino/followers","following_url":"https://api.github.com/users/RickCarlino/following{/other_user}","gists_url":"https://api.github.com/users/RickCarlino/gists{/gist_id}","starred_url":"https://api.github.com/users/RickCarlino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RickCarlino/subscriptions","organizations_url":"https://api.github.com/users/RickCarlino/orgs","repos_url":"https://api.github.com/users/RickCarlino/repos","events_url":"https://api.github.com/users/RickCarlino/events{/privacy}","received_events_url":"https://api.github.com/users/RickCarlino/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-30T04:31:19Z","updated_at":"2015-12-30T12:53:08Z","closed_at":null,"body":"FORTH 200X introduced [structs](https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Forth200x-Structures.html). I can't find any documentation on online or in documentation for the best way to perform struct packing, though.\r\n\r\nIs it possible in FORTH (GForth, specifically)? I'm trying build an MQTT message packet which requires setting flags that are smaller than one byte."},"comment":{"url":"https://api.github.com/repos/ForthHub/discussion/issues/comments/167991840","html_url":"https://github.com/ForthHub/discussion/issues/20#issuecomment-167991840","issue_url":"https://api.github.com/repos/ForthHub/discussion/issues/20","id":167991840,"user":{"login":"lowfatcomputing","id":10626,"avatar_url":"https://avatars.githubusercontent.com/u/10626?v=3","gravatar_id":"","url":"https://api.github.com/users/lowfatcomputing","html_url":"https://github.com/lowfatcomputing","followers_url":"https://api.github.com/users/lowfatcomputing/followers","following_url":"https://api.github.com/users/lowfatcomputing/following{/other_user}","gists_url":"https://api.github.com/users/lowfatcomputing/gists{/gist_id}","starred_url":"https://api.github.com/users/lowfatcomputing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lowfatcomputing/subscriptions","organizations_url":"https://api.github.com/users/lowfatcomputing/orgs","repos_url":"https://api.github.com/users/lowfatcomputing/repos","events_url":"https://api.github.com/users/lowfatcomputing/events{/privacy}","received_events_url":"https://api.github.com/users/lowfatcomputing/received_events","type":"User","site_admin":false},"created_at":"2015-12-30T12:53:08Z","updated_at":"2015-12-30T12:53:08Z","body":"I have added something like this to mecrisp-stellaris:\r\n\r\nhttp://hub.darcs.net/pointfree/mecrisp-stellaris/browse/mk20dx256/bitstruct-example.txt\r\n\r\nhttp://hub.darcs.net/pointfree/mecrisp-stellaris/browse/mk20dx256/bitstruct.txt\r\n\r\nIt was based on this [Mitch Bradley's, *Structured Data with Bit Fields*](http://pastebin.com/raw/WvTZNTGd) but extended to support fields that contain subfields (I called them superfields)."}}