global res globlist 
for {set i 0} {$i<[llength $globlist]} {incr i 1} {
	set x [lindex $globlist $i]
	regexp {(\w+)(\s+)?(\d+)?(\.(\d+))?(\s+)?(\d+)?(\.(\d+))?(\s+)?(\d+)?(\.(\d+))?(\s+)?(\d+)?(\.(\d+))?(\s+)?(\d+)?(\.(\d+))?(\s+)?(\d+)?(\.(\d+))?} $x stri cmmd sp0 num1 num11 num12 sp1 num2 num21 num22 sp2 num3 num31 num32 sp3 num4 num41 num42 sp4 num5 num51 num52 sp5 num6 num61 num62
	switch -exact -- $cmmd {
		ws {	if {![string equal $num31 ""]} {
				set argu3 [expr $num3+$num31];
			} else {
				set argu3 $num3;
			}
			ScilabEval "\[a b\]=ws($num1,$num2,$argu3);nodno=$num1" "seq";
			ScilabEval "g=make_graph('ws',0,nodno,a,b)" "seq";
			ScilabEval "et=1/kba_para(g);;TCL_SetVar('et',et)" "seq";
			ScilabEval "c=3*($num2-2)*(1-$argu3)^3/(4*($num2-1));;TCL_SetVar('c',c)" "seq";
			ScilabEval "a=2*$num1/$num2;;u=$num1*$num2*$argu3/2;;fu=1/(sqrt(u^2+2*u))*atan(sqrt((u/(u+1))));;p=a*fu;;TCL_SetVar('p',p)" "seq";
			ScilabEval {TCL_EvalStr('$res insert end ""Clustering coefficient:[format %6.6f $c]""')}
			ScilabEval {TCL_EvalStr('$res insert end ""Average distance: [format %12.6f $p]""')}
			ScilabEval {TCL_EvalStr('$res insert end ""Epidemic transition: [format %12.6f $et]""')}
			ScilabEval {TCL_EvalStr('$res insert end ""--------------""')}}
		nw {	set argu1 [expr $num1 + $num11];
			set argu2 [expr $num2 + $num21];
			ScilabEval "c=3*($argu1-2)/(4*($num1-1)+4*$num1*$num2*($num2+2));;TCL_SetVar('c',c);" "seq";
			ScilabEval {TCL_EvalStr('$res insert end ""c:[format %6.6f $c]""')}}
		ba {	ScilabEval "\[a b\]=ba($num1,$num2,$num3);;nodno=$num1+$num3;t=tran(a,b,nodno)" "seq";
			ScilabEval "g=make_graph('ba',0,nodno,a,b)" "seq";
			ScilabEval "pp=log($num1)/log(log($num1));;TCL_SetVar('pp',pp);" "seq";
			ScilabEval "aa=($num1)^2*($num1+1)^2/4/($num1-1);;bb=log(($num1+1)/$num1)-1/($num1+1);;dd=(log($num2))^2/$num2;;cc=aa*bb*dd;;TCL_SetVar('cc',cc);" "seq";
			ScilabEval "ett=kba_para(g)/kfang_para(g);;TCL_SetVar('ett',ett);" "seq";
			ScilabEval {TCL_EvalStr('$res insert end ""Clustering coefficient:[format %6.6f $cc]""')}
			ScilabEval {TCL_EvalStr('$res insert end ""Average distance: [format %12.6f $pp]""')}
			ScilabEval {TCL_EvalStr('$res insert end ""Epidemic transition: [format %12.6f $ett]""')}
			ScilabEval {TCL_EvalStr('$res insert end ""--------------""')}}		
	}
}

