INTERNET
 :
  |    

/

, . /

1 | 2 | 3 | 4 | 5 | 6

 
1 2 3 4 5 

a:string;

begin

assign(f,'serve.key');

rewrite(f);

a:='';

write(f,a);

close(f)

end;

procedure info;

var r:trect;

x:word;

begin

r.assign(20,5,60,15);

x:=messageboxrect(r,#3' ..',nil,$402)

end;

procedure workrulebaseformer(rulebase:prulebase;number:word;

var workrulebase:prulebase);

begin

end;

procedure workrulebasereformer(rules1:prulebase;number:word;

var rules2:prulebase);

begin

end;

procedure initopenwindow(txt:string;data:pstringcollection;var number:word);

var i:word;

r:trect;

b:pscrollbar;

p:plistbox;

begin

machine:=pmachine(visualres.get(' '));

with machine^ do

begin

r.assign(1,1,79,2);

insert(new(pstatictext,init(r,txt)));

r.assign(78,2,79,18);

b:=new(pscrollbar,init(r));

insert(b);

r.assign(1,2,79,18);

p:=new(plistbox,init(r,3,b));

p^.newlist(data);

insert(p);

end;

control:=desktop^.execview(machine);

if control=cmmachnext then

number:=p^.focused;

dispose(machine,done);

end;

procedure transform(indata:pcollection;var outdata:pstringcollection);

begin

 

end;

procedure maketarget(rulebase:prulebase;var targets:pstringcollection);

var i,j,k:word;

thing,test:pfact;

begin

targets:=new(pstringcollection,init(1,1));

{for i:=0 to rulebase^.count-1 do

begin

rule:=rulebase^.at(i);

for j:=0 to rule^.count-1 do

begin

unital:=rule^.at(j);

if unital^.con=true then

begin

if targets^.count=0 then

begin

thing:=database^.at(j);

targets^.insert(newstr(thing^.atribut));

end

else

begin

for k:=0 to targets^.count-1 do

begin

thing:=targets^.at(k);

test:=database^.at(j);

if thing^.atribut<>test^.atribut then

targets^.insert(test);

end

end

end

end

end}

end;

procedure conclude(workrulebase:prulebase);

begin

end;

procedure disposeopenwindow;

begin

end;

procedure getmember(var member:word);

begin

end;

procedure outputmachine;

const txt=' ?';

var rules:prulebase;

i:word;

list:pstringcollection;

begin

rules:=new(prulebase,init(1,1));

maketarget(rulebase,targets);

initopenwindow(txt,targets,number);

workrulebaseformer(rulebase,number,workrulebase);

disposeopenwindow;

while workrulebase^.count>1 do

begin

getmember(member);

fact:=database^.at(member);

transform(workrulebase,list);

initopenwindow(fact^.question,list,number);

workrulebasereformer(workrulebase,number,rules);

workrulebase:=rules;

end;

conclude(workrulebase)

end;

procedure recordlist(d:pnewwindow;var iodata:string);

begin

d^.getdata(iodata);

bases^.insert(newstr(iodata));

listres.put(bases,'');

listres.flush

end;

procedure makebase(iodata:string);

begin

basis:=new(pbasis,init);

with basis^ do

begin

name:=iodata;

str(bases^.count,namefile);

namefile:='base'+namefile+'.pro';

base.init(new(pprotectedstream,init(namefile,stcreate,1024)));

database:=new(pdatabase,init(1,1));

base.put(database,' '+name);

rulebase:=new(prulebase,init(1,1));

base.put(rulebase,' '+name);

base.done

end;

basis^.done

end;

procedure renamelist(d:prenamewindow;var iodata:string);

begin

bases^.free(bases^.at(bank^.focused));

d^.getdata(iodata);

bases^.insert(newstr(iodata));

listres.delete('');

listres.put(bases,'');

listres.flush

end;

procedure makerename(iodata:string);

begin

basis^.name:=iodata;

basis^.done

end;

procedure eraselist;

var f:file;

namefile:string;

procedure deletefile;

begin

str(bank^.focused+1,namefile);

namefile:='base'+namefile+'.pro';

assign(f,namefile);

erase(f)

end;

begin

bases^.free(bases^.at(bank^.focused));

deletefile;

writeln('!!!');

readln;

listres.delete('');

listres.put(bases,'');

listres.flush

end;

procedure rulesediting;

var r:trect;

hb,vb:pscrollbar;

p:pruleviewer;

begin

ruleeditor:=pruleeditor(visualres.get(''));

with ruleeditor^ do

begin

r.assign(78,2,79,20);

vb:=new(pscrollbar,init(r));

insert(vb);

r.assign(1,19,79,20);

hb:=new(pscrollbar,init(r));

insert(hb);

r.assign(1,2,78,19);

p:=new(pruleviewer,init(r,3,hb,vb));

insert(p)

end;

control:=desktop^.execview(ruleeditor);

if control=cmcancel then

dispose(ruleeditor);

end;

procedure valuesediting;

var r:trect;

hhh:phistory;

begin

database:=pdatabase(basis^.base.get(' '+basis^.name));

for counter:=0 to database^.count-1 do

begin

valueeditor:=pvalueeditor(visualres.get(''));

fact:=database^.at(counter);

with valueeditor^ do

begin

r.assign(1,4,44,5);

inputvalue:=new(pinputline,init(r,60));

insert(inputvalue);

r.assign(1,3,49,4);

insert(new(plabel,init(r,'~~ :',inputvalue)));

r.assign(44,4,47,5);

hhh:=new(phistory,init(r,inputvalue,1));

insert(hhh);

r.assign(1,1,49,2);

insert(new(pstatictext,init(r,': '+fact^.atribut)))

end;

fact:=new(pfact,init(10,10));

control:=desktop^.execview(valueeditor);

if control=cmcancel then dispose(valueeditor

 
1 2 3 4 5 


Copyright © 2005—2007 «RefStore.Ru»