Changeset c5cb943d in mainline for uspace/dist/src/sysel/demos/list.sy


Ignore:
Timestamp:
2010-06-09T19:01:08Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1113c9e
Parents:
051bc69a
Message:

Update SBI to rev. 291.

File:
1 edited

Legend:

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

    r051bc69a rc5cb943d  
    2929-- Using the List class from the library.
    3030class ListDemo is
    31         fun Main() is
     31        fun Main(), static is
    3232                var list : List/int;
    3333
     
    3939                list.Append(8);
    4040
    41                 var n : ListNode/int;
     41                var e : IEnumerator/int;
    4242
    43                 n = list.First;
    44                 while n != nil do
    45                         Builtin.WriteLine(n.Data);
    46                         n = n.Next;
     43                e = list.GetEnumerator();
     44                while e.MoveNext() do
     45                        Builtin.WriteLine(e.Data);
    4746                end
    4847        end
Note: See TracChangeset for help on using the changeset viewer.