//=============================================================
const
LENGTH=5;
end;
//=============================================================
interface NoTable DoAccept;
//-------------------------------------------------------------
create view
;
//-------------------------------------------------------------
var
i: integer;
mas: array [1..1] of integer;
//-------------------------------------------------------------
browse DepBrowse5 NoTableNavigation;
fields
mas[i] #3'Элемент массива' : protect;
i #3'Позиция';
end;
//-------------------------------------------------------------
handleEvent
cmInit:
{
mas[1] := 20;
mas[2] := 38;
mas[3] := 12;
mas[4] := -12;
mas[5] := 0;
i := 1;
}
cmDoGetPrev:
{
if i <= 1 then
Abort;
if i > 1 then
i := i - 1;
}
cmDoGetNext:
{
if i >= LENGTH then
Abort;
if i < LENGTH then
i := i + 1;
}
cmDoGetLast:
i := LENGTH;
cmDoGetFirst:
i := 1;
cmGetAddr:
ReturnPosition(i);
cmGetDirect:
i := SetPosition;
cmDoFind:
{
var j: integer;
var str: string;
str := SearchValue;
for(j:=1; j <= LENGTH; j:=j+1)
if SubStr(string(mas[j]), 1, Length(str)) = str then
{
i := j;
RescanPanel(tnNoTable);
Exit;
}
Abort; //не нашли
}
end;
end.