io7m
com.io7m.jpra
0.7.0-SNAPSHOT
5.7. array
5. Expressions - Types
5.9. Reference
Previous
Up
Next
5.8
string
5.8.1. Syntax
5.8.2. Description
5.8.3. Semantics
5.8.4. Size
5.8.5. Implementation Constraints
5.8.6. Implementation Requirements
5.8.1
Syntax
5.8.1.1. string Syntax
string_expression = (string s:<size_expression> e:<quoted_string>)
5.8.2
Description
1
A
string
type expression describes a bounded string.
5.8.3
Semantics
1
An expression
[string s e]
describes a string that may contain at most
s
octets. The string is encoded using encoding
e
.
2
If
s <= 0
, the type is rejected as invalid.
5.8.4
Size
1
The storage size in bits of an expression
[string s e]
is
4 + (s * 8)
.
5.8.5
Implementation Constraints
1
There are no constraints placed on implementations for the
string
type.
5.8.6
Implementation Requirements
1
Implementations are required to support the
"UTF-8"
encoding.
Previous
Up
Next
5.7. array
5. Expressions - Types
5.9. Reference