',mhl
' tip',v1001" ", if v77:'-' or v84:'-' or v80='Metalurgia & Materiais' or v1='ABM CA52' then
if v1='ABM CA52' and s(mpu,v91,mpl):'CONGRESSO' then 'LIVRO' else 'ARTIGO' fi
else
'LIVRO'
fi
' | aut'v1001" ",v30+|; |
' | tit'v1001" ",v50+|; |
' | evt'v1001" ",if p(v70) then v70+|; | else if p(v80) then v80+|; | fi fi
' | loc'v1001" ",v71+|; |
' | cid'v1001" ",v73
' | edt'v1001" ",v74
' | ano'v1001" ",if p(v75) then v75 else if p(v96) then v96.4 fi fi
' | vol'v1001" ",if p(v76) then v76 else if p(v82) then v82," / "v83 fi fi
' | pag'v1001" ",if p(v77) then v77 else if p(v84) then v84 fi fi
' | qtd'v1001" ",if v77:'-' or v84:'-' then
if p(v77) then
if size(left(v77,instr(v77,'-')-1)) > size(right(v77,size(v77)-instr(v77,'-'))) then
f(val(s(left(v77,size(left(v77,instr(v77,'-')-1))-size(right(v77,size(v77)-instr(v77,'-')))),right(v77,size(v77)-instr(v77,'-'))))-val(left(v77,instr(v77,'-')-1)),1,0)
else
f(val(right(v77,size(v77)-instr(v77,'-')))-val(left(v77,instr(v77,'-')-1)),1,0)
fi
fi
if p(v84) then
if size(left(v84,instr(v84,'-')-1)) > size(right(v84,size(v84)-instr(v84,'-'))) then
f(val(s(left(v84,size(left(v84,instr(v84,'-')-1))-size(right(v84,size(v84)-instr(v84,'-')))),right(v84,size(v84)-instr(v84,'-'))))-val(left(v84,instr(v84,'-')-1)),1,0)
else
f(val(right(v84,size(v84)-instr(v84,'-')))-val(left(v84,instr(v84,'-')-1)),1,0)
fi fi
else
if v80='Metalurgia & Materiais' then
'1' /* Se nao tinha IF e eh Met. e Mat. eh uma página */ else '0' fi
fi
' | lug'v1001" ",v1
' | ins'v1001," "v40+|; |
mpl,' ',/#
fi