1: PACKAGE BODY FND_NUMBER as
2: /* $Header: AFNUMBRB.pls 115.15 2004/08/19 19:10:39 dmcmahon ship $ */
3:
4: C_FORMAT constant varchar2(60) :=
5: 'FM999999999999999999999.99999999999999999999';
38: pi number := 3.1415;
39: my_char varchar2(20);
40: begin
41: /*
42: DBMS_OUTPUT.PUT_LINE('Decimal separator is '||fnd_number.decimal_char);
43: DBMS_OUTPUT.PUT_LINE('Group separator is '||fnd_number.group_separator);
44: DBMS_OUTPUT.PUT_LINE('Canonical mask is '||fnd_number.canonical_mask);
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
39: my_char varchar2(20);
40: begin
41: /*
42: DBMS_OUTPUT.PUT_LINE('Decimal separator is '||fnd_number.decimal_char);
43: DBMS_OUTPUT.PUT_LINE('Group separator is '||fnd_number.group_separator);
44: DBMS_OUTPUT.PUT_LINE('Canonical mask is '||fnd_number.canonical_mask);
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
47: DBMS_OUTPUT.PUT_LINE('and back is '||to_char(fnd_number.canonical_to_number('3.14')));
40: begin
41: /*
42: DBMS_OUTPUT.PUT_LINE('Decimal separator is '||fnd_number.decimal_char);
43: DBMS_OUTPUT.PUT_LINE('Group separator is '||fnd_number.group_separator);
44: DBMS_OUTPUT.PUT_LINE('Canonical mask is '||fnd_number.canonical_mask);
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
47: DBMS_OUTPUT.PUT_LINE('and back is '||to_char(fnd_number.canonical_to_number('3.14')));
48: DBMS_OUTPUT.PUT_LINE('Canon integer is '||fnd_number.number_to_canonical(4));
42: DBMS_OUTPUT.PUT_LINE('Decimal separator is '||fnd_number.decimal_char);
43: DBMS_OUTPUT.PUT_LINE('Group separator is '||fnd_number.group_separator);
44: DBMS_OUTPUT.PUT_LINE('Canonical mask is '||fnd_number.canonical_mask);
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
47: DBMS_OUTPUT.PUT_LINE('and back is '||to_char(fnd_number.canonical_to_number('3.14')));
48: DBMS_OUTPUT.PUT_LINE('Canon integer is '||fnd_number.number_to_canonical(4));
49: select fnd_number.number_to_canonical(pi)
50: into my_char
43: DBMS_OUTPUT.PUT_LINE('Group separator is '||fnd_number.group_separator);
44: DBMS_OUTPUT.PUT_LINE('Canonical mask is '||fnd_number.canonical_mask);
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
47: DBMS_OUTPUT.PUT_LINE('and back is '||to_char(fnd_number.canonical_to_number('3.14')));
48: DBMS_OUTPUT.PUT_LINE('Canon integer is '||fnd_number.number_to_canonical(4));
49: select fnd_number.number_to_canonical(pi)
50: into my_char
51: from dual;
44: DBMS_OUTPUT.PUT_LINE('Canonical mask is '||fnd_number.canonical_mask);
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
47: DBMS_OUTPUT.PUT_LINE('and back is '||to_char(fnd_number.canonical_to_number('3.14')));
48: DBMS_OUTPUT.PUT_LINE('Canon integer is '||fnd_number.number_to_canonical(4));
49: select fnd_number.number_to_canonical(pi)
50: into my_char
51: from dual;
52:
45:
46: DBMS_OUTPUT.PUT_LINE('Canon number is '||fnd_number.number_to_canonical(pi));
47: DBMS_OUTPUT.PUT_LINE('and back is '||to_char(fnd_number.canonical_to_number('3.14')));
48: DBMS_OUTPUT.PUT_LINE('Canon integer is '||fnd_number.number_to_canonical(4));
49: select fnd_number.number_to_canonical(pi)
50: into my_char
51: from dual;
52:
53: DBMS_OUTPUT.PUT_LINE('Canon number from SQL is '||my_char);
72: -- OK, this is a bit kludgey, but I can't seem to find any way to access
73: -- the numeric characters directly.
74: decimal_char := substr(ltrim(to_char(.3,'0D0')),2,1);
75: group_separator := substr(ltrim(to_char(1032,'0G999')),2,1);
76: end FND_NUMBER;