summaryrefslogtreecommitdiffstats
path: root/eshtrans/funcparams.esh
blob: cfabe614ab9edffd6c3ec2a2be4601cad1d4c81c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Example of parameter lists and argument type checking.

greet(bool doprint, int i, string s)
{
	if ${doprint}; then
		while [ ${i} -gt 0 ]; do
			printf '%s\n' "${s}"
			i=$((${i} - 1))
		done
	fi
}

main()
{
	greet true 3 'Hello, world!'
	return 0
}