Thursday, September 13, 2012

Fixed-Point Decimal Variables

The attributes FIXED and DECIMAL are used to declare fixed-point decimal variables. The FIXED attribute is implied by DECIMAL. If you do not specify the precision and the scale factor, the default values are 10 and 0, respectively. The format of a declaration of a single fixed-point decimal variable is:

DECLARE identifier [FIXED] DECIMAL [(p[,q])]; 
Some examples of fixed-point decimal declarations are:

DECLARE PERCENTAGE FIXED DECIMAL (5,2); 
DECLARE TONNAGE FIXED DECIMAL (9); 

No comments:

Post a Comment

Comments