Newbie questions about Pliant
List
Example |
Message posted by maybe Ivan Gudym on 2001/11/15 09:59:42 |
Can anybody drop me some example of List usage: fill with some numbers and then walk through List and, say, print it.
Thanks BTW, I don't see any axample of data sets usage, short description isn't enough
|
Message posted by maybe Patrice Ossona de Mendez on 2001/11/15 10:35:56 |
Here is a basic sample for a list of Int and an array of Int:
# list version function toto var List:Int myset := new List:Int # clears the local for (var Int i) 1 10 myset += i # appends to the list each val myset # val will be a temporary variable console val eol # prints the variable (and end of line)
# array version function toto var Array:Int myset := new Array:Int # clears the local for (var Int i) 1 10 myset += i # appends to the array each val myset # val will be a temporary variable console val eol # prints the variable (and end of line)
|