/ Check-in [ee01fbb629]
DEMO | DOWNLOAD | DEPLOY | SEARCH
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add cdata map demo
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ee01fbb629cf87b65fb8857777347c5d09412bfc
User & Date: pmacdona 2019-04-28 15:19:48
Context
2019-04-28
17:00
Backport parser.y changes. check-in: c7ace0a428 user: pmacdona tags: trunk
15:19
Add cdata map demo check-in: ee01fbb629 user: pmacdona tags: trunk
2019-04-27
19:52
Object key now accepts undef. check-in: 508b20f070 user: pmacdona tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added js-demos/cdata_map.jsi.





























>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/local/bin/jsish --U %s

// A map indexed by struct.
;CStruct('Bee', 'int s:4; int r:3; int t=8;');
;CStruct('Bkey', 'int a; int b;');

var bkey, tree3  = new CData('Bee{@Bkey}');
;bkey={a:1,b:2};
;tree3.set(bkey, 't', 2);
;tree3.get(bkey, 't');
;bkey.a++;
;tree3.set(bkey, 't', 2);
;tree3.names();
;tree3.conf();