Skip to content

Commit 472189f

Browse files
committed
Add summary
Wat Numeric Values
1 parent baf8122 commit 472189f

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

proposals/wat-numeric-values/Overview.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,30 @@
22

33
## Summary
44

5-
TODO
5+
* Currently, the data segments can only be written in strings.
6+
7+
```wat
8+
(data (offset (i32.const 0)) "1234") ;; 3132 3334
9+
```
10+
```wat
11+
(data (offset (i32.const 0)) "\09\ab\cd\ef") ;; 09ab cdef
12+
```
13+
14+
* This proposal proposes an alternative writing format in numeric values.
15+
16+
```wat
17+
(data (offset (i32.const 0))
18+
(f32 0.2 0.3 0.4) ;; cdcc 4c3e 9a99 993e cdcc cc3e
19+
)
20+
```
21+
```wat
22+
(memory $1
23+
(data
24+
(i8 1 2) ;; 0102
25+
(i16 3 4) ;; 0300 0400
26+
)
27+
)
28+
```
629
730
## Motivation
831

0 commit comments

Comments
 (0)