EUROXw.d Format

Writes numeric values with a leading euro symbol (E), a period that separates every three digits, and a comma that separates the decimal fraction.
Category: Numeric
Alignment: right

Syntax

EUROXw.d

Syntax Description

w
specifies the width of the output field.
Default:6
Range:1-32
Tip:If you want the euro symbol to be part of the output, be sure to choose an adequate width.
d
specifies the number of digits to the right of the decimal point in the numeric value.
Default:0
Range:0-31
Requirement:must be less than w

Comparisons

  • The EUROXw.d format is similar to the EUROw.d format, but EUROw.d format reverses the roles of the comma and the decimal point. This convention is common in English–speaking countries.
  • The EUROXw.d format is similar to the DOLLARXw.d format, except that DOLLARXw.d format writes a leading dollar sign instead of the euro symbol.

Example

These examples use 1254.71 as the value of amount.
Statements
Results
----+----1----+----2----+----3
put amount eurox10.2;
 E1.254,71
put amount eurox5.;
1.255
put amount eurox9.2;
E1.254,71
put amount eurox15.3;
     E1.254,710
data _null_;       
   input x;    
   put x eurox10.2;    
   put x eurox5.;     
   put x eurox9.2;    
   put x eurox15.3;    
   datalines; 
1254.71 
; run;
SAS Log:
 E1.254,71
1.255
E1.254,71
     E1.254,710
/* This code determines the default length. */ 
data _null_;    
   input x;    
   put x eurox.;    
   datalines; 
1 
22 
333 
4444 
55555
666666 
7777777 
88888888 
999999999 
1234561234 
;run;
SAS Log:
    E1
   E22
  E333
E4.444
55.555
666666
7.78E6
8.89E7
   1E9
1.23E9
Note: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format.

See Also

Format: