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


Ignore:
Timestamp:
2010-04-23T21:41:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f4f866c
Parents:
074444f
Message:

Update SBI to rev. 207.

File:
1 edited

Legend:

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

    r074444f r38aaacc2  
    3030class ListDemo is
    3131        fun Main() is
    32                 var list : List;
    33                 var i : Int;
     32                var list : List/int;
    3433
    35                 list = new List();
     34                list = new List/int();
    3635                list.Init();
    3736
    38                 -- We need autoboxing or generics to get rid of this mess.
    39                 i = new Int(); i.Value = 5; list.Append(i);
    40                 i = new Int(); i.Value = 6; list.Append(i);
    41                 i = new Int(); i.Value = 7; list.Append(i);
    42                 i = new Int(); i.Value = 8; list.Append(i);
     37                list.Append(5);
     38                list.Append(6);
     39                list.Append(7);
     40                list.Append(8);
    4341
    44                 var n : ListNode;
     42                var n : ListNode/int;
    4543
    4644                n = list.First;
    4745                while n != nil do
    48                         Builtin.WriteLine((n.value as Int).Value);
     46                        Builtin.WriteLine(n.Value);
    4947                        n = n.Next;
    5048                end
Note: See TracChangeset for help on using the changeset viewer.