File: params

package info (click to toggle)
kvirc2 2.1.3-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 16,308 kB
  • ctags: 9,533
  • sloc: cpp: 86,257; sh: 10,532; makefile: 631; perl: 419; ansic: 315; sed: 16
file content (33 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
	# KVIrc script
	# Call this test script with /parse <filename> <some params>
	echo File name : $0
	echo Number of parameters : $#
	echo Param 0 : $0; # This file name
	echo Param 1 : $1; # The first parameter
	echo Param 2 : $2; # The second one...
	echo Param 3 : $3; # ...
	echo Param 4 : $4
	echo Param 5 : $5
	echo Param 6 : $6
	echo Param 7 : $7
	echo Param 8 : $8
	echo Param 9 : $9
	echo Param 10: $10    ; # Out of range; interpreted as $1
	echo Param 1389: $1389; # Out of range; interpreted as $1
	echo Params 0- : $0-; # Full commandline
	echo Params 1- : $1-; # All parameters
	echo Params 2- : $2-; # All parameters following the first one
	echo Params 3- : $3-; # ...
	echo Params 4- : $4-
	echo Params 5- : $5-
	echo Params 6- : $6-
	echo Params 7- : $7-
	echo Params 8- : $8-
	echo Params 9- : $9-
	echo Params 91- : $91-; # Out of range , interpreted as $9

	if($# == 0)echo You have specified no parameters.
	else if($# == 1)echo You have specified one parameter.
	else echo You have specified $# parameters.
}