NAME
oEdtk::FPField - fixed-point numeric field
SYNOPSIS
use oEdtk::FPField;
my $field = oEdtk::FPField->new('MONTANT', 8, 2);
print $field->process('00012345'), "\n"; # '123.45'
DESCRIPTION
An oEdtk::Field subclass for fixed-point numbers. The field is described by an integer length and a fractional length, and process renders the value with exactly the requested number of decimals.
METHODS
new
my $field = oEdtk::FPField->new($name, $ilen, $flen);
Construct a field whose byte length is $ilen + $flen. $flen defaults to 0.
process
my $value = $field->process($data);
Strip the blanks from $data; an empty value returns ''. A value without a decimal point is scaled down by 10**$flen, then formatted with $flen decimals.
AUTHOR
The oEdtk team.