File: if

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 (36 lines) | stat: -rw-r--r-- 672 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
34
35
36
# Stress for the command parser: if command and block parsing
{
{
{
{
{{{{{{{{if                                  (!$#)echo Please \
execute \
this \
script \
passing \
some \
parameters\
.


	else {

# Newline + blocks torture...

		if
			( \
				$# == 1          		\
			)
		{
			echo You have specified one parameter {{{{\$1=$1-}}}}


			{{{{if($isnumber($1))
			{ echo It is a number.;}else { if("$1"@= \
						"\"KVIrc\"")echo and it is $1!;else echo And it is not "KVIrc" :(; # comment ;}}}}#comment;}}
		else{#comment;if   ($#==2)
				echo You have specified two parameters : {$1-}; else echo You have specified more than two parameters : {$1-};
		}}}}}}}}}}
}
}
}}