Program AverageColumns; var wid,str,nd,i : integer; var offset: real; var formulos,isi,filos: string; begin wid := GetCurrentWindow(datatype); i := YColumn; filos := GetColumnProperty(i, name); SetBoxTitle('Average Columns'); Input('First',str, 'Last',nd); i:=0; isi:=''; formulos:=''; {Do the string } for i:=str+1 to nd+1 do begin NumberToString(i, isi, 1, 0); formulos := formulos + '+' + 'c' + isi; end; NumberToString(nd-str+1, isi, 1, 0); formulos := '(' + formulos + ')/' + isi; writeln(formulos); InsertColumns(window wid, at str); SelectColumn(col str); Transform(window wid, operation formulaOp, xColumn 0, yColumn str, formula formulos, makePermanent true); SetDefaultCols(1,str,0,0); filos := filos[1]+filos[2]+filos[3] + '.avg.'; SetColumnProperties(col str, name filos); end;