/////////////////////////// KETlib //////////////////////////// use("KetCindyPlugin"); Dircdy=loaddirectory; setdirectory(gethome()); import("ketcindy.ini"); setdirectory(Dircdy); import("ketcindylibkey.cs");//funflg=0; import("keynamelib.txt"); Seteditable(3,["","Size=18","Width=300"]);// no ketjs Seteditable(4,["5","Size=18","Width=50"]);// no ketjs ky=""; ansflg=0; fnflg=0; detflg=0; stage=0; Str=""; Strnow=""; M1strnq=""; M2strnq=""; drwt(line,str):=( drawtext([-5,poy],text(line)+" "+str,size->15); poy=poy-0.8; ); ky=""; flg=-1; inspect(Text20,"button.script","funflg=1;name="+Dq+"0"+Dq+";"); inspect(Text21,"button.script","funflg=1;name="+Dq+"1"+Dq+";"); inspect(Text22,"button.script","funflg=1;name="+Dq+"2"+Dq+";"); inspect(Text23,"button.script","funflg=1;name="+Dq+"3"+Dq+";"); inspect(Text24,"button.script","funflg=1;name="+Dq+"4"+Dq+";"); inspect(Text25,"button.script","funflg=1;name="+Dq+"5"+Dq+";"); inspect(Text26,"button.script","funflg=1;name="+Dq+"6"+Dq+";"); inspect(Text27,"button.script","funflg=1;name="+Dq+"7"+Dq+";"); inspect(Text28,"button.script","funflg=1;name="+Dq+"8"+Dq+";"); inspect(Text29,"button.script","funflg=1;name="+Dq+"9"+Dq+";"); inspect(Text30,"button.script","funflg=1;name="+Dq+"pi"+Dq+";"); inspect(Text31,"button.script","funflg=1;name="+Dq+"x"+Dq+";"); inspect(Text32,"button.script","funflg=1;name="+Dq+"-"+Dq+";"); inspect(Text33,"button.script","funflg=1;name="+Dq+","+Dq+";"); inspect(Text34,"button.script","funflg=1;name="+Dq+"*"+Dq+";"); inspect(Text35,"button.script","funflg=1;name="+Dq+"cos("+Dq+";"); inspect(Text36,"button.script","funflg=1;name="+Dq+")"+Dq+";"); inspect(Text37,"button.script","funflg=1;name="+Dq+"fr("+Dq+";"); inspect(Text38,"button.script","funflg=1;name="+Dq+"sq("+Dq+";"); inspect(Text39,"button.script","funflg=1;name="+Dq+"^("+Dq+";"); inspect(Text40,"button.script","funflg=1;name="+Dq+"e^("+Dq+";"); inspect(Text41,"button.script","funflg=1;name="+Dq+"log("+Dq+";"); inspect(Text42,"button.script","funflg=1;name="+Dq+"("+Dq+";"); inspect(Text43,"button.script","funflg=1;name="+Dq+"sin("+Dq+";"); inspect(Text44,"button.script","funflg=1;name="+Dq+"+"+Dq+";"); inspect(Text50,"button.script","funflg=1;name="+Dq+"Delete()"+Dq+";"); inspect(Text51,"button.script","funflg=1;name="+Dq+"Allclear()"+Dq+";"); inspect(Text52,"button.script","funflg=1;name="+Dq+"Left()"+Dq+";"); inspect(Text53,"button.script","funflg=1;name="+Dq+"Right()"+Dq+";"); inspect(Text54,"button.script","funflg=1;name="+Dq+"RRight()"+Dq+";"); Text9.xy=[23.5,9.2];//入力ボタン Text10.xy=[26.5,-2];//リセットボタン Pxy=[1.9,1.03]; Text20.xy=[7.74,-3.07]+Pxy; Text21.xy=[7.74,-2.36]+Pxy; Text22.xy=[8.71,-2.36]+Pxy; Text23.xy=[9.68,-2.36]+Pxy; Text24.xy=[7.74,-1.64]+Pxy; Text25.xy=[8.71,-1.64]+Pxy; Text26.xy=[9.68,-1.64]+Pxy; Text27.xy=[7.74,-0.92]+Pxy; Text28.xy=[8.71,-0.92]+Pxy; Text29.xy=[9.68,-0.92]+Pxy; Text30.xy=[8.71,-3.07]+Pxy; Text31.xy=[9.68,-3.07]+Pxy; Text32.xy=[6.77,-2.36]+Pxy; Text33.xy=[6.77,-3.07]+Pxy; Text34.xy=[5.8,-3.07]+Pxy; Text35.xy=[6.77,-1.64]+Pxy; Text36.xy=[6.77,-0.92]+Pxy; Text37.xy=[5.8,-0.2]+Pxy; Text38.xy=[6.77,-0.2]+Pxy; Text39.xy=[7.74,-0.2]+Pxy; Text40.xy=[8.71,-0.2]+Pxy; Text41.xy=[9.68,-0.2]+Pxy; Text42.xy=[5.8,-0.92]+Pxy; Text43.xy=[5.8,-1.64]+Pxy; Text44.xy=[5.8,-2.36]+Pxy; Text50.xy=[5.8,0.48]+Pxy; Text51.xy=[6.77,0.48]+Pxy; Text52.xy=[7.74,0.48]+Pxy; Text53.xy=[8.71,0.48]+Pxy; Text54.xy=[9.68,0.48]+Pxy; Text3.xy=[7.5,2.6]; Text4.xy=[9.3,5.6]; /////////////////////////// figures /////////////////////////////// Ketinit(); Setketcindyjs(["Sc=1","Label=[]","Color=offwhite"]); ////////// 入力窓の設定 ////////// str1="5"; //no ketjs //str1=Textedit(4); //only ketjs //////////////// 数式入力の設定 ///////////////// nameL1=[["BS","AC","<",">",">>"]]; Keytable(5,9.8,1,7,[7.5,1.3],[0,1,0],nameL1,[0,-0.2],20); nameL2=Keyname(); Keytable(5,9.8,5,7,[7.5,-2.2],[1,1,0],nameL2,[0,-0.2],20); if(funflg==1, if(contains(Manifun,name), parse(name+";"); , tmp=indexof(Str,"?"); if(tmp>0,npos=tmp,npos=length(Str)); out=Addfunstr(name,npos,Str); tmp=length(out_1)-length(Str); npos=npos+tmp; Str=out_1; //npos=out_2; if(npos0, Letter([6,4.7],"e","定義域:$-"+text(str1)+"\,\leq x\leq\,"+text(str1)+"$",["Size=1.2"]); ); if(length(str1)>0, Letter([6,3.7],"e","値 域:$-"+text(str1)+"\,\leq y\leq\,"+text(str1)+"$",["Size=1.2"]); ); Letter([6,2.7],"e","関数$y=$",["Size=1.2"]); ////////// グラフの設定 ////////// str0=Rcdystr; if(length(str0)>0, regional(tmp); Plotdata("1",str0,"x=[-"+text(str1)+","+text(str1)+"]",["nodisp","Num=1000"]); stgr1=text(gr1); gL=[]; if(indexof(stgr1,"[[[")==0, gL=gr1; , forall(1..length(gr1), sgL=gr1_#; if(length(sgL)>1, gL=append(gL,sgL); ); ); gL=gL_1; ); pDL=[]; forall(1..length(gL), pD=gL_#; pDL=append(pDL,[pD_1/parse(str1)*5,pD_2/parse(str1)*5]); ); Listplot("1",pDL); ); Windispg();