*-------------------------------------------------------------------------- function PackedDecimalToNumber(xx) local zz zz = ath(m.xx) assert inlist(right(m.zz,1), 'D', 'F') return iif(right(m.zz,1) == 'D', -val(left(m.zz,len(m.zz)-1)), val(left(m.zz,len(m.zz)-1)) ) endfunc *-------------------------------------------------------------------------- function ath(x) local out, i out = '' for i = 1 to len(m.x) out = m.out + right(transform(asc(substr(m.x,m.i,1)),'@0'),2) endfor return out endfunc *---------------------------------------------------------------------