File: list

package info (click to toggle)
epic4 1%3A3.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,780 kB
  • sloc: ansic: 56,285; makefile: 630; sh: 161; perl: 30
file content (19 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# showlist <list of items>
#
# Comments:
# This is apparently an intellectual exercise, as this is most certainly
# not the "best" way to do this, by any modern measure.  However, it does
# demonstrate that it is possible to use a counter to iterate through the
# argument list in a useful manner without using recursion of any kind.
#
alias showlist {
	@ sl.cnt = 0
	while (sl.wrd = [$($sl.cnt)])
	{
		echo $sl.wrd
		@sl.cnt++
	}
	^assign -sl.cnt
	^assign -sl.wrd
}
#Ian Frechett