Finding the size of an Icon list |
|
The unary ``*'' operator, applied to a list, returns
the number of elements in the list. For example, this program fragment
should print the number 23:
foo := list ( 23 );
write ( * foo );
Here is an expression that writes every element of list
``L'':
every i := 1 to ( * L ) do
write ( L[i] );
|
John Shipman, john@nmt.edu
Last updated: 1996/01/06 21:12:57 UT URL: http://www.nmt.edu/tcc/help/lang/icon/listsize.html |
|