Changeset c5cb943d in mainline for uspace/dist/src/sysel/demos/map.sy
- Timestamp:
- 2010-06-09T19:01:08Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1113c9e
- Parents:
- 051bc69a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/dist/src/sysel/demos/map.sy
r051bc69a rc5cb943d 29 29 -- Using the Map class from the library. 30 30 class MapDemo is 31 fun Main() is31 fun Main(), static is 32 32 var map : Map/string/int; 33 33 … … 39 39 map["four"] = 4; 40 40 41 Builtin.WriteLine(map["one"]); 42 Builtin.WriteLine(map["two"]); 43 Builtin.WriteLine(map["three"]); 44 Builtin.WriteLine(map["four"]); 41 var e : IEnumerator/string; 42 43 e = map.GetEnumerator(); 44 while e.MoveNext() do 45 Builtin.Write(e.Data); 46 Builtin.Write(" -> "); 47 Builtin.WriteLine(map[e.Data]); 48 end 45 49 end 46 50 end
Note:
See TracChangeset
for help on using the changeset viewer.