Changeset 1113c9e in mainline for uspace/dist/src/sysel/demos/map.sy


Ignore:
Timestamp:
2010-06-09T19:03:24Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8eec3c8
Parents:
8f80c77 (diff), c5cb943d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jsvoboda/helenos/sysel.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/dist/src/sysel/demos/map.sy

    r8f80c77 r1113c9e  
    2929-- Using the Map class from the library.
    3030class MapDemo is
    31         fun Main() is
     31        fun Main(), static is
    3232                var map : Map/string/int;
    3333
     
    3939                map["four"] = 4;
    4040
    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
    4549        end
    4650end
Note: See TracChangeset for help on using the changeset viewer.