You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -872,9 +874,12 @@ Please refer to the `Char` [library documentation](sophia_stdlib.md#char).
872
874
873
875
## Byte arrays
874
876
875
-
Byte arrays are fixed size arrays of 8-bit integers. They are described in hexadecimal system,
876
-
for example the literal `#cafe` creates a two-element array of bytes `ca` (202) and `fe` (254)
877
-
and thus is a value of type `bytes(2)`.
877
+
Byte arrays are to be understood as immutable and continuous arrays of 8-bit integers. They are described in hexadecimal system,
878
+
for example the literal `#cafe` creates a two-element array of bytes `ca` (202) and `fe` (254).
879
+
880
+
The type of a byte array is written as `bytes(n)`, where `n` is the size of the array. For instance,
881
+
the type of the literal mentioned above (`#cafe`) is `bytes(2)`, as it consists of two bytes (`ca` and `fe`).
882
+
Size information can be also omitted (i.e. `bytes()`) to specify the type of a byte array of arbitrary/unknown length. In other words, for any `n`, `bytes(n)` is a subtype of `bytes()`.
878
883
879
884
Please refer to the `Bytes`[library documentation](sophia_stdlib.md#bytes).
0 commit comments