interval:=100;
bovengrens:=round(1.4*PRES99);
if round(1.4*strtoint(PRES90))>bovengrens then bovengrens:=round(1.4*strtoint(PRES90));
if round(1.4*strtoint(PRES82))>bovengrens then bovengrens:=round(1.4*strtoint(PRES82));
if round(1.4*strtoint(PRES75))>bovengrens then bovengrens:=round(1.4*strtoint(PRES75));
if round(1.4*strtoint(PRES68))>bovengrens then bovengrens:=round(1.4*strtoint(PRES68));
if round(1.4*strtoint(PRES62))>bovengrens then bovengrens:=round(1.4*strtoint(PRES62));
if bovengrens>100 then interval:=round(bovengrens/30)*10;
if bovengrens>600 then interval:=round(bovengrens/300)*100;
if bovengrens>9000 then interval:=round(bovengrens/3000)*1000;
if interval<100 then interval:=100;
pxperinw:=170/(3*interval);
y62:=20+round(pxperinw*strtoint(PRES62));
y68:=20+round(pxperinw*strtoint(PRES68));
y75:=20+round(pxperinw*strtoint(PRES75));
y82:=20+round(pxperinw*strtoint(PRES82));
y90:=20+round(pxperinw*strtoint(PRES90));
y99:=20+round(pxperinw*(PRES99));
if (trim(jaar)='2004') or (trim(jaar)='2005') then
begin
y04:= 20+round(pxperinw*strtoint(pop));
end;
if length(trim(pop))=5 then
begin
insert('.',pop, 3);
end;
writeln(f);
writeln(f,'==Demografie==');
writeln(f,'Onderstaande figuur toont het verloop van het inwonertal (bron: [[Institut national de la statistique et des études économiques/Definities|INSEE-tellingen]]).');
writeln(f, '<timeline> ');
writeln(f, 'ImageSize = width:250 height:200 ');
writeln(f, 'PlotArea = left:40 right:10 top:10 bottom:20 ');
writeln(f, 'TimeAxis = orientation:horizontal ');
writeln(f, 'AlignBars = justify ');
writeln(f, 'Colors = ');
writeln(f, ' id:gray1 value:gray(0.9) ');
writeln(f, ' ');
writeln(f, 'DateFormat = yyyy ');
writeln(f, 'Period = from:1960 till:2010 ');
writeln(f, 'ScaleMajor = unit:year increment:10 start:1960');
writeln(f, ' ');
writeln(f, 'PlotData = ');
writeln(f, ' bar:'+inttostr(interval*3)+' color:gray1 width:1 ');
writeln(f, ' from:start till:end ');
writeln(f, ' bar:'+inttostr(interval*2)+' color:gray1 ');
writeln(f, ' from:start till:end ');
writeln(f, ' bar:'+inttostr(interval)+' color:gray1 ');
writeln(f, ' from:start till:end ');
writeln(f, ' bar:0 color:gray1 ');
writeln(f, ' ');
writeln(f, ' ');
writeln(f, 'LineData = ');
writeln(f, ' layer:front ');
writeln(f, ' points:(48,'+inttostr(y62)+')(84,'+inttostr(y68)+') color:blue width:2 #1962 tot 1968. Inwonertal 1962: '+PRES62+' 1968: '+PRES68);
writeln(f, ' points:(84,'+inttostr(y68)+')(100,'+inttostr(y75)+') color:blue width:2 #1975: '+PRES75);
writeln(f, ' points:(100,'+inttostr(y75)+')(128,'+inttostr(y82)+') color:blue width:2 #1982: '+PRES82);
writeln(f, ' points:(128,'+inttostr(y82)+')(160,'+inttostr(y90)+') color:blue width:2 #1990: '+PRES90);
writeln(f, ' points:(160,'+inttostr(y90)+')(196,'+inttostr(y99)+') color:blue width:2 #1999: '+inttostr(PRES99));
if (trim(jaar)='2004') or (trim(jaar)='2005') then
begin
writeln(f, ' points:(196,'+inttostr(y99)+')(228,'+inttostr(y04)+') color:blue width:2 #2004/5 ');
end;
writeln(f, ' ');
writeln(f, '</timeline> ');
writeln(f,'<!-- Bron: Frans bureau voor statistiek. Cijfers inwoneraantal volgens de definitie "population sans doubles comptes" --> ');
writeln(f);