// questionsDLL.code




var question(var vopros,var formula,var nameVar,var outOK){
	namedll="what.dll";
	if(DLLS.indexOf(namedll)<0){
		LoadDLL(namedll);
		SendDLL(namedll,"WAY:"+WAY);
		}
	if(vopros=="equality")what="?: get equality for ("+formula+") unknown {"+nameVar+"}";
	if(vopros=="optimize")what="?: optimize ("+formula+")";
	if(vopros=="compare"){
		if(typeof(formula)=="program"){if(formula.typeof()=="="){
			formula2=PROGRAM("#==#");
			formula2.setSub({0},formula.getSub({0}));
			formula2.setSub({1},formula.getSub({1}));
			formula=formula2;
			}}
		what="?: compare ("+formula+")";
		}
	if(vopros=="function"){
		a=formula[1].export();
		a=nameVar[1]+":"+a.substr(1,a.size()-2)+";";
		b=formula[0].export();
		b=nameVar[0]+":"+b.substr(1,b.size()-2)+";";
		what="?: get code "+nameVar[0]+"=f("+nameVar[1]+") for table: head("+nameVar[1]+","+nameVar[0]+"){"+a+b+"}";
		}
	if(vopros=="row"){
		what="?: get code for row "+formula.export();
		if(isset(nameVar))what+=" first("+nameVar+")";
		}
	SendDLL(namedll,what);
	R=RecvDLL(namedll);
	if(isset(outOK)){
		trace(what);
		trace(R.export());
		}
	return R;
}


// questionsDLL.code	:-|