Skip to content

Commit c3d96c7

Browse files
authored
nushell#4924 Update data types with binary literal syntax (#390)
1 parent c1bbc2b commit c3d96c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

book/types_of_data.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,15 @@ The full list of filesize units are:
171171

172172
Binary data, like the data from an image file, is a group of raw bytes.
173173

174-
You can write binary as a literal using the `0x[...]` form:
174+
You can write binary as a literal using any of the `0x[...]` or `0b[...]` forms:
175175

176176
```
177177
> 0x[1F FF]
178+
> 0b[1 1010]
178179
```
179180

181+
Incomplete bytes will be left-padded with zeros.
182+
180183
## Structured data
181184

182185
Structured data builds from the simple data. For example, instead of a single integer, structured data gives us a way to represent multiple integers in the same value. Here's a list of the currently supported structured data types: records, lists and tables.

0 commit comments

Comments
 (0)