summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/oracle/src/orl.inc
blob: 1ccfd1d463989d93502b911f82f520cec536fa25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911

{
  Automatically converted by H2Pas 1.0.0 from orl.h
  The following command line parameters were used:
    -p
    -D
    -l
    jojo.so
    orl.h
}

{$PACKRECORDS C}

  { Copyright (c) 1993, 2003, Oracle Corporation.  All rights reserved.   }
  {
    Author:             Srinath Krishnaswamy
    Date:               11/24/93
    Source documents:   "Functional Specification for C Language Mapping of
                        OTS Types, Object Management Subsystem", "Oracle C
                        Coding Standards version 2.2", and the header file
                        template
    Rule sets:          the generic and .h file rule sets
    Quality status:     not exited
    Identification tag: [ one or more letters to identify the .h file ]
    Revision code:      11/24/93
   
    NAME
  
      ORL - ORacle's external C Language interface to primitive OTS types
   
    DESCRIPTION
  
      This header file contains C langauge interface to the OTS primitive
      types. The interface includes C mapping of OTS primitive types and
      the prototype of the pre-defined operations on the primitive types.
   
      ***********************************************************************
      *** NOTE: The OCI functions for objects requires the                ***
      ***       application to be running in OBJECT mode. That is, during ***
      ***       process initialization OCIInitialize(), the mode          ***
      ***       specified should be OBJECT mode.                          ***
      **                OCIInitialize(OCI_OBJECT, ..);                    ***
      ***********************************************************************
  
    RELATED DOCUMENTS
  
      [1] Krishnaswamy, Srinath and Nguyen, Tin A., "Functional Specification
          for C Language Mapping of OTS Types, Object Management Subsystem",
          March 1994.
      [2] Nguyen, Tin A., "The Open Type System", Oracle Corporation,
          February 1994.
      [3] Klein, Jonathan D., "Large Field Management", Oracle Corporation,
          October 1993.
   
    PUBLIC FUNCTIONS
   
      OCI - OCI functions to manipulate Oracle Number, float and decimal
        ARITHMETIC
          OCINumberInc - OCINumber INCrement (optimized)
          OCINumberDec - OCINumber DECrement (optimized)
          OCINumberAdd - OCINumber ADD numbers
          OCINumberSub - OCINumber SUBtract numbers
          OCINumberMul - OCINumber MULtiply numbers
          OCINumberDiv - OCINumber DIVide numbers
          OCINumberMod - OCINumber MODulo division
          OCINumberIntPower - OCINumber integer PoWeR
          OCINumberShift - OCINumber decimal ShiFT number
          OCINumberNeg - OCINumber NEGate number
          OCINumberAbs - OCINumber ABSolute value
          OCINumberCeil - OCINumber CEiling of number
          OCINumberFloor - OCINumber FLooR of number
          OCINumberSqrt - OCINumber SQuare Root of number
          OCINumberSign - OCINumber get SIGN of number
        NATIVE TYPE CONVERSION
          OCINumberToInt  - OCINumber convert number TO machine-format Integer
          OCINumberFromInt - OCINumber convert machine-format Integer TO Number
          OCINumberToReal  - OCINumber convert number TO machine-format Real
          OCINumberToRealArray  - OCINumber convert array of numbers TO
                                  machine-format Real
          OCINumberFromReal - OCINumber convert machine-format Real TO Number
        TEXT STRING CONVERSION
          OCINumberToText  - OCINumber convert number TO String
          OCINumberFromText - OCINumber convert String TO Number
        COMPARISON
          OCINumberCmp - OCINumber CoMPare numbers
          OCINumberIsZero - OCINumber comparison with ZERo
          OCINumberIsInt - OCINumber Is an Integer
        ASSIGNMENT
          OCINumberAssign - OCINumber ASsiGn number
          OCINumberSetZero - OCINumber Set number to Zero value
          OCINumberSetPi - OCINumber Set number to Pi
        ROUNDING
          OCINumberTrunc - OCINumber TRUncate an Oracle number
          OCINumberRound - OCINumber ROUnd number
          OCINumberPrec - OCINumber round to Precision digits
        TRANSCENDENTAL
          OCINumberSin - OCINumber SINe
          OCINumberArcSin - OCINumber Arc SINe
          OCINumberHypSin - OCINumber SiNe Hyperbolic
          OCINumberCos - OCINumber COSine
          OCINumberArcCos - OCINumber Arc COSine
          OCINumberHypCos - OCINumber CoSine Hyperbolic
          OCINumberTan - OCINumber TANgent
          OCINumberArcTan - OCINumber Arc TANgent
          OCINumberArcTan2 - OCINumber Arc TaNgent 2
          OCINumberHypTan - OCINumber TaNgent Hyperbolic
          OCINumberPower - OCINumber arbitrary Base EXponentiation
          OCINumberExp - OCINumber EXPonentiation to base e
          OCINumberLn  - OCINumber Logarithm Natural
          OCINumberLog - OCINumber LOGarithm to arbitrary base
  
      OCIDate - OCI functions to manipulate OCI Date
        OCIDateToExternal - OCIDate convert date to external form
        OCIDateFromExternal - OCIDate convert external form of date into OCIDate
        OCIDateAssign - OCIDate Assignment
        OCIDateToText  - OCIDate convert date TO String
        OCIDateFromText - OCIDate convert String TO Date
        OCIDateZoneToZone - OCIDate convert date from one time 
                          Zone TO another Zone
        OCIDateCompare - OCIDate CoMPare dates
        OCIDateAddMonths - OCIDate ADd or subtract Months
        OCIDateAddDays - OCIDate ADd or subtract Days
        OCIDateLastDay - OCIDate get date of LaST day of month
        OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
        OCIDateNextDay - OCIDate get date of Next DaY
        OCIDateCheck - OCIDate CHecK if the given date is valid
        OCIDateSysDate - OCIDate get current SYStem date and time
  
      OCIString - OCI String functions to manipulate Variable-length string
        OCIStringAssign - OCIString Assign string to string
        OCIStringAssignText - OCIString Assign Text string to string
        OCIStringResize - OCIString ReSiZe string
        OCIStringSize - OCIString get String Size
        OCIStringPtr - OCIString get String PoinTeR
        OCIStringAllocSize - OCIString get Allocated SiZe
   
      OCIRaw - OCI Raw functions to manipulate variable-length raW
        OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw*) to raw
                          (of type OCIRaw*)
        OCIRawResize - OCIRaw Resize raw
        OCIRawSize - OCIRaw get Raw Size
        OCIRawPtr  - OCIRaw get Raw data Pointer
        OCIRawAllocSize - OCIRaw get Allocated Size
  
      OCIColl - OCI Collection generic functions. These functions can be 
                  used to manipulate both variable-length array (varray) and 
                  nested table.
        OCICollSize  - OCIColl return current SIZe of the given collection
                  (in number of elements)
        OCICollMax  - OCIColl return the MAXimum number of elements in the
                  collection (i.e. upper-bound)
        OCICollGetElem  - OCIColl GET pointer to the element at the given 
                  position
        OCICollAssignElem  - OCIColl assign to element at given index
        OCICollAssign  - OCIColl ASsiGn collection; perform deep-copy of source 
                  collection to target collection
        OCICollAppend  - OCIColl aPPend the given element to the end of the
                  collection
        OCICollTrim  - OCIColl trim (delete) the given number of elements 
                  from the end of the collection
        OCICollIsLocator - OCIColl indicates whether a collection is locator
                           based or not.
        OCIIterCreate  - OCIColl Create an ITerator to scan the collection 
                  elements
        OCIIterDelete  - OCIColl Delete ITerator
        OCIIterInit  - OCIColl Initialize ITerator to scan the given collection
        OCIIterGetCurrent - OCIColl Iterator based, get CURrent 
                  collection element
        OCIIterNext - OCIColl Iterator based, get NeXT collection element
        OCIIterPrev - OCIColl Iterator based, get PReVious collection element
   
        OCITable - OCI functions to manipulate nested Table. The OCIColl*() and 
                  OCITable*() functions can be used to manipulate nested table
        OCITableDelete(i) - OCITable if element(i) exists then the element is 
                  marked as deleted else the function returns false. So 
                  delete's create "holes".
        OCITableExists(i) - OCITable return true iff an element at
                  position i EXIsts
        OCITableFirst  - OCITable return the smallest value of i for which
                  exists(i) is true.
        OCITableLast  - OCITable return the largest value of i for which 
                  exists(i) is true.
        OCITableNext(i) - OCITable return pointer to the smallest position j, 
                  greater than i, such that OCITableExists(j) is true
        OCITablePrev(i) - OCITable return pointer to the largest position j,
                  less than i, such that OCITableExists(j) is true
        OCITableSize - OCITable return current SIZe of the given nested table not
                  including deleted elements
  
      OCIRef - OCI functions to manipulate object Reference
        OCIRefClear  - OCIRef CLeaR or nullify a ref
        OCIRefAssign  - OCIRef ASsiGn a ref to another
        OCIRefIsEqual  - OCIRef compare two refs for EQUality
        OCIRefIsNull  - OCIRef test if a ref is NULl 
        OCIRefFromHex  - OCIRef convert a Hexadecimal string TO a Ref
        OCIRefToHex   - OCIRef convert a ref to a Hexadecimal string
        OCIRefHexSize  - OCIRef get size of buffer in bytes to store hexadecimal
                  string
  
    OBSOLETE: to be replaced by functions from oci.h:
  
      ORLL - ORL functions to manipulate lob Locators
        orllasg   - ORLL AsiGn one locator to another
        orllequ   - ORLL compare two locators for EQUality
        orlliini  - ORLL Is the locator INItialized?
        orllgsz   - ORLL Get locator SiZe
        orllgcid  - ORLL Get Character set ID
  
        NOTE: The following are specific to FILE lobs:
  
        orllsnm - ORLL Set directory alias and file NaMe in the locator
        orllgnm - ORLL Get directory alias and file NaMe from the locator
   
    EXAMPLES
  
      Examples are given in the description of each function where
      relevant.
   
    NOTES
  
      This file has been subsetted to contain ONLY the routines that will
      be in the first release.
   
    QUESTIONS
       
    MODIFIED
      srseshad   03/12/03 - convert oci public api to ansi
      rpingte    11/21/02 - Add OCICollGetElemArray and OCINumberToRealArray
      aahluwal   06/03/02 - bug 2360115
      gayyappa   02/01/02 - fix 2210776 : change Dom to DOM 
      whe        09/25/01 - add OCIXMLType & OCIDomDocument opaque types
      bpalaval   02/09/01   - Change text to oratext.
      rkasamse   09/20/99 -   lint changes
      whe        09/01/99 -   976457:check __cplusplus for C++ code
      hsbedi     08/11/99 -   Add macro
      rxgovind   10/14/98 -  make non exposed calls (OCIRowType etc) private
      rxgovind   06/09/98 -  update OCIRowTypeCreate
      nmantrav   05/11/98 -  add OCIRowTypeGetCount
      rxgovind   03/29/98 -  add OCIRowType and OCIRowData interfaces
      jwijaya    05/06/98  - add OCICollIsLocator                                
      rxgovind   03/18/98 -  opaque types: move to kolo.h
      etucker    02/02/98 -  add comments for Dec and Inc
      etucker    01/29/98 -  Finish core5 integration
      rxgovind   11/11/97 -  opaque types
      etucker    10/28/97 -  add ORLN functions for SDK
      cxcheng    07/28/97 -  remove OCILobLocator #define
      skmishra   05/13/97 -  stdcc compatibility changes
      skrishna   04/25/97 -  rename OCINumber*(): Exp Power TanHyp Zero Init
                             TanToArc Sqr Truncate and Compare 
      skotsovo   03/31/97 -  remove OCILobLocatorSize
      skrishna   03/25/97 -  remove orld2i and orldi2d
      skrishna   03/18/97 -  fix ifdef for supporting ansi and k&r proto-types
      cxcheng    02/06/97 -  take out short name support except with SLSHORTNAME
      skrishna   01/06/97 -  update OCITableSize() comments
      skrishna   12/27/96 -  fix OCIDateGet/OCIDateSet
      skrishna   12/12/96 -  update OCICollGelElem comments
      skrishna   11/07/96 -  OCICollGetElem: interface change
      skrishna   11/05/96 -  add OCIDate Get/Set and OCIDateAssign
      cxcheng    10/31/96 -  change OCINumberTanHyp to OCINumberHypTan
      cxcheng    10/30/96 -  #define orll short names to long names
      dchatter   10/26/96 -  fix some OCI file long names
      cxcheng    10/24/96 -  remove unnecessary comment in front
      cxcheng    10/14/96 -  disable long name mapping for LOB functions
      skrishna   10/13/96 -  continue beautification
      skotsovo   10/16/96 -  update ocilob names
      cxcheng    10/09/96 -  add structure members in #define for date/time
      cxcheng    10/09/96 -  more lint fixes
      skrishna   10/09/96 -  continue beautification
      cxcheng    10/09/96 -  more fixes
      skrishna   10/09/96 -  change fixed-char rep. to orlvstr*
      jwijaya    10/08/96 -  continue beautification
      jwijaya    10/07/96 -  beautify
      cxcheng    10/07/96 -  more changes
      cxcheng    10/04/96 -  replace short names with long names
      skrishna   10/01/96 -  orlcsiz, orltsiz: change prototype to take errhdl
      skrishna   09/23/96 -  fix lint errors
      skotsovo   09/23/96 -  remove orllmkcur().
      jwijaya    09/17/96 -  comments on null ref
      skrishna   09/19/96 -  change orlraw format
      skotsovo   09/19/96 -  add orlliini and remove orllnul
      skrishna   08/14/96 -  orlvstr: change format to ub4 followed by text
      jboonleu   08/06/96 -  update comment
      skotsovo   08/08/96 -  revert to locators instead of descriptors as input t
      jboonleu   07/23/96 -  remove orlrcur
      skrishna   07/06/96 -  add orltsiz
      skrishna   07/05/96 -  add orld2i and orldi2d
      jwijaya    07/03/96 -  add ANSI prototypes
      skrishna   06/27/96 -  document default string format in orlds2d & orld2s
      skrishna   06/25/96 -  change max date value
      skrishna   06/18/96 -  modify orld2s() comments
      skotsovo   06/13/96 -  orll functions take lob descriptors instead of locat
      rxgovind   06/05/96 -  change prototype of orlrcur to take ocienvh
      skrishna   05/30/96 -  support collection trimming
      skrishna   05/30/96 -  remove orlralo/fre and orllalo/fre instead use 
                             orionew/fre
      skrishna   05/28/96 -  add orlt*() and modify orla*()
      skotsovo   05/23/96 -  add orlbl typedefs for pro*c
      jboonleu   05/14/96 -  add orlrcur
      rxgovind   05/08/96 -  changes for 3gl callbacks
      skotsovo   05/01/96 -  in orllasg, no need to alloc orlbl*
      skrishna   04/21/96 -  merge changes from 960418 object branch into big
      skrishna   04/17/96 -  rename orlrcpy to orlrasg
      skrishna   04/12/96 -  add orlr2h and orlrh2r functions
      skotsovo   04/15/96 -  add fnt to make the lob locator current
      skrishna   04/08/96 -  change orl*() to take ocienvh* and ocierrh* instead
                             of oroenv*
      skotsovo   03/22/96 -  add locator functions
      skotsovo   03/22/96 -  add locator functions
      skrishna   02/27/96 -  remove mlslabel interface
      skotsovo   02/20/96 -  remove orlbty and use dty type instead.
      skotsovo   02/14/96 -  add text file lobs.
      skrishna   01/31/96 -  update comments of orln2r, orldchk, orlds2d & orld2s
      skrishna   01/31/96 -  change orld2s() and orln2s() to return string length
      skrishna   01/21/96 -  remove old raw interface 
      skrishna   12/14/95 -  add raw interface
      skotsovo   01/03/96 -  change LOB offsets and lengths from ub4 to ubig_ora
                             to support 64 bit machines.
      skotsovo   10/30/95 -  add orlblsiz() to get lob locator size
      skrishna   10/24/95 -  move ref functions from ori and update the ref
                             functions to support variable-length ref
      cxcheng    10/20/95 -  add more comments on number versions
      cxcheng    10/13/95 -  add more number functions
      cxcheng    08/29/95 -  Support for segmented varrays
      cxcheng    08/18/95 -  modifiy orlmls structure
      skrishna   06/06/95 -  rename orln, orld, orlvs and orlva to orlnum,
                             orldat, orlvstr and orlvary respectively 
      skrishna   11/15/94 -  remove orlnget() function 
      skrishna   09/20/94 -  modify orldbtw() to return number of days only 
      skrishna   08/24/94 -  change format string length type from ub4 to ub1 
      skrishna   07/19/94 -  Rename orln2c & orlnc2n to orln2s & orlns2n 
      skrishna   06/29/94 -  Add blob interface; add examples 
      skrishna   06/23/94 -  Update comments and format 
      skrishna   05/19/94 -  update varray append comments 
      skrishna    05/05/94 -  Subsetting 
      skrishna    11/24/93 -  Creation
   }
  {--------------------------------------------------------------------------- }
  {                         SHORT NAMES SUPPORT SECTION                        }
  {--------------------------------------------------------------------------- }
{$ifdef SLSHORTNAME}
  { the following are short names that are only supported on IBM mainframes
     with the SLSHORTNAME defined.
     With this all subsequent long names will actually be substituted with
     the short names here  }

  const
     OCIArray = orlvary;     
     OCIColl = orlcol;     
     OCICollAppend = orlcapp;     
     OCICollAssign = orlcasg;     
     OCICollAssignElem = orlcase;     
     OCICollGetElem = orlcget;     
     OCICollGetElemArray = orlcgeta;     
     OCICollMax = orlcmax;     
     OCICollSize = orlcsiz;     
     OCICollTrim = orlctrm;     
     OCICollIsLocator = orlcilc;     
     OCIDate = orldat;     
     OCIDateAddDays = orldadd;     
     OCIDateAddMonths = orldadm;     
     OCIDateCheck = orldchk;     
     OCIDateCompare = orldcmp;     
     OCIDateDD = day_orldat;     
     OCIDateDaysBetween = orldbtw;     
     OCIDateFromText = orlds2d;     
     OCIDateLastDay = orldlst;     
     OCIDateMM = mon_orldat;     
     OCIDateNextDay = orldndy;     
     OCIDateSysDate = orldsys;     
     OCIDateTime = time_orldat;     
     OCIDateYYYY = gye_orldat;     
     OCIDateZoneToZone = orldz2z;     
     OCIIter = orlcitr;     
     OCIIterCreate = orlccit;     
     OCIIterDelete = orlcdit;     
     OCIIterGetCurrent = orlcicur;     
     OCIIterInit = orlciit;     
     OCIIterNext = orlcinxt;     
     OCIIterPrev = orlciprv;     
     OCINumber = orlnum;     
     OCINumberAbs = orlnabs;     
     OCINumberAdd = orlnadd;     
     OCINumberArcCos = orlnacos;     
     OCINumberArcSin = orlnasin;     
     OCINumberArcTan = orlnatan;     
     OCINumberAssign = orlnasg;     
     OCINumberCeil = orlncel;     
     OCINumberCos = orlncos;     
     OCINumberDiv = orlndiv;     
     OCINumberPower = orlnbex;     
     OCINumberFloor = orlnflr;     
     OCINumberFromInt = orlni2n;     
     OCINumberFromReal = orlnr2n;     
     OCINumberFromText = orlns2n;     
     OCINumberHypCos = orlncsh;     
     OCINumberHypSin = orlnsnh;     
     OCINumberSetZero = orlnini;     
     OCINumberSetPi = orlnspi;     
     OCINumberInc = orlninc;     
     OCINumberDec = orlndec;     
     OCINumberIntPower = orlnpwr;     
     OCINumberLn = orlnln;     
     OCINumberLog = orlnlog;     
     OCINumberMod = orlnmod;     
     OCINumberMul = orlnmul;     
     OCINumberNeg = orlnneg;     
     OCINumberPart = orlnpart;     
     OCINumberExp = orlnexp;     
     OCINumberRound = orlnrou;     
     OCINumberPrec = orlnpre;     
     OCINumberShift = orlnsft;     
     OCINumberSign = orlnsgn;     
     OCINumberSin = orlnsin;     
     OCINumberSqrt = orlnsqr;     
     OCINumberSub = orlnsub;     
     OCINumberTan = orlntan;     
     OCINumberHypTan = orlntnh;     
     OCINumberArcTan2 = orlnatn2;     
     OCINumberToInt = orln2i;     
     OCINumberToReal = orln2r;     
     OCINumberToRealArray = orln2ra;     
     OCINumberToText = orln2s;     
     OCINumberTrunc = orlntru;     
     OCINumberCmp = orlncmp;     
     OCINumberIsZero = orlnzer;     
     OCINumberIsInt = orlnint;     
     OCIRaw = orlraw;     
     OCIRawAllocSize = orlwasz;     
     OCIRawAssignBytes = orlwabr;     
     OCIRawAssignRaw = orlwarr;     
     OCIRawPtr = orlwgrp;     
     OCIRawResize = orlwrsz;     
     OCIRawSize = orlwgsz;     
     OCIRefAssign = orlrasg;     
     OCIRefClear = orlrclr;     
     OCIRefFromHex = orlrh2r;     
     OCIRefHexSize = orlrhsz;     
     OCIRefIsEqual = orlrequ;     
     OCIRefIsNull = orlrnul;     
     OCIRefToHex = orlr2h;     
     OCIString = orlvstr;     
     OCIStringAllocSize = orlvasz;     
     OCIStringAssign = orlvass;     
     OCIStringAssignText = orlvats;     
     OCIStringPtr = orlvgsp;     
     OCIStringResize = orlvrsz;     
     OCIStringSize = orlvgsz;     
     OCITable = orltbl;     
     OCITableDelete = orltdel;     
     OCITableExists = orltexi;     
     OCITableFirst = orltfst;     
     OCITableLast = orltlst;     
     OCITableNext = orltnxt;     
     OCITablePrev = orltprv;     
     OCITableSize = orltsiz;     
     OCITime = orldtm;     
     OCITimeHH = orldtmhh;     
     OCITimeMI = orldtmmm;     
     OCITimeSS = orldtmss;     
     OCI_LOBMODE_READONLY = ORLBMORO;     
     OCI_LOBMODE_READWRITE = ORLBMORW;     
{$endif}
  { SLSHORTNAME  }
  {*************************************************************************** }
  {                         NUMBER/FLOAT/DECIMAL TYPE                          }
  {*************************************************************************** }

  const
     OCI_NUMBER_SIZE = 22;     

  type
     POCINumber = ^OCINumber;
     OCINumber = record
          OCINumberPart : array[0..(OCI_NUMBER_SIZE)-1] of ub1;
       end;

  { 
   * OCINumber - OCI Number mapping in c
   *
   * The OTS types: NUMBER, NUMERIC, INT, SHORTINT, REAL, DOUBLE PRECISION,
   * FLOAT and DECIMAL are represented by OCINumber.
   * The contents of OCINumber is opaque to clients. 
   *
   * For binding variables of type OCINumber in OCI calls (OCIBindByName(),
   * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_VNU.
    }
  {
     EXAMPLE 
  
     The following example shows how to manipulate an attribute of type 
     oracle number.
    
       struct person
       
         OCINumber sal;
       ;
       typedef struct person person;
  
       OCIError *err;
       person* joe;
       person* tom;
       person* debbie;
       OCINumber  *joesal;
       OCINumber  *tomsal;
       OCINumber *debsal;
       sword   status;
       int     inum;
       double  dnum;
       OCINumber ornum;
       char    buffer[21];
       ub4     buflen;
       sword   result;
       
       /o See oci.h for an example of how to initialize OCIError.
        o For this example, assume the OCIEnv and OCIError has been
        o initialized.
        o/
  
       /o Pin joe, tom and debbie person objects in the object cache. See ori.h
        o for an example on pinning objects. For this example, assume that
        o joe, tom and debbie are pointing to pinned objects.
        o/
       joesal = &joe->sal;
       tomsal = &tom->sal;
       debsal = &debbie->sal;
  
       /o initialize joe's salary to be $12,000 o/
       inum = 12000;
       status = OCINumberFromInt(err, &inum, sizeof(inum), OCI_NUMBER_SIGNED,
                                 joesal);
       if (status != OCI_SUCCESS)
                                /o goto to handle error from OCINumberFromInt o/;
  
       /o initialize tom's salary to be same as joe o/
       OCINumberAssign(err, joesal, tomsal);
  
       /o initialize debbie's salary to be 20% more than joe's o/
       dnum = 1.2;
       status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
       if (status != OCI_SUCCESS)
                              /o goto to handle error from OCINumberFromReal o/;
       status = OCINumberMul(err, joesal, &ornum, debsal);
       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberMul o/;
  
       /o give tom a 50% raise o/
       dnum = 1.5;
       status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
       if (status != OCI_SUCCESS)
                              /o goto to handle error from OCINumberFromReal o/;
       status = OCINumberMul(err, tomsal, &ornum, tomsal);
       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberMul o/;
  
       /o double joe's salary o/
       status = OCINumberAdd(err, joesal, joesal, joesal);
       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberAdd o/;
  
       /o get joe's salary in integer o/
       status = OCINumberToInt(err, joesal, sizeof(inum), OCI_NUMBER_SIGNED,
                               &inum);
       if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToInt o/;
       /o inum is set to 24000 o/
  
       /o get debbie's salary in double o/
       status = OCINumberToReal(err, debsal, sizeof(dnum), &dnum);
       if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToReal o/;
       /o dnum is set to 14400 o/
  
       /o print tom's salary as DEM0001`8000.00 o/
       buflen = sizeof(buffer);
       status = OCINumberToText(err, tomsal, "C0999G9999D99", 13, 
                   "NLS_NUMERIC_CHARACTERS='.`' NLS_ISO_CURRENCY='Germany'", 54,
                   &buflen, buffer);
       if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToText o/;
       printf("tom's salary = %s\n", buffer);
  
       /o compare joe and tom's salary o/
       status = OCINumberCmp(err, joesal, tomsal, &result);
       if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberCmp o/;
       /o result is positive o/
  
       /o read debbie's new salary from string o/
       status = OCINumberFromText(err, "48`000.00", 9, "99G999D99", 9,
                        "NLS_NUMERIC_CHARACTERS='.`'", 27, debsal);
       if (status != OCI_SUCCESS)
                              /o goto to handle error from OCINumberFromText o/;
       /o debbie's salary is now 48000.00 o/
  
   }
  {----------------------------- OCINumberInc -------------------------------- }

{$IFNDEF LinkDynamically}
  function OCINumberInc(err:POCIError; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberInc';
{$ELSE}
var OCINumberInc : function (err:POCIError; number:POCINumber):sword;cdecl;
{$ENDIF}
  {
     NAME: OCINumberInc - OCINumber INCrement numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN/OUT) a positive Oracle number to be incremented
     DESCRIPTION:
          Increment Oracle number in place. It is assumed that the input is
          an integer between 0 and 100^21-2. If the is input too large, it will
          be treated as 0 - the result will be an Oracle number 1. If the input
          is not a positive integer, the result will be unpredictable.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberDec -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberDec(err:POCIError; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberDec';
{$ELSE}
  OCINumberDec : function (err:POCIError; number:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberDec - OCINumber DECrement numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN/OUT) - a positive Oracle number to be decremented
     DESCRIPTION:
          Decrement Oracle number in place. It is assumed that the input is an
          integer between 1 and 100^21-2. If the input is too large, it will be
          treated as 1 - the result will be an Oracle number 0. If the input is
          not a positive integer, the result will be unpredictable.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {-------------------------- OCINumberSetZero ------------------------------- }
{$IFNDEF LinkDynamically}
  procedure OCINumberSetZero(err:POCIError; num:POCINumber);cdecl;external ocilib name 'OCINumberSetZero';
{$ELSE}
  OCINumberSetZero : procedure (err:POCIError; num:POCINumber);cdecl;
{$ENDIF}

  {
     NAME: OCINumberSetZero - OCINumber Set number to Zero value
     PARAMETERS:
          err (IN/OUT) - pointer to OCI error handle
          num (OUT) - set to zero value
     DESCRIPTION:
          Initialize the given number to value 0.
    }
  {--------------------------- OCINumberSetPi -------------------------------- }
{$IFNDEF LinkDynamically}
  procedure OCINumberSetPi(err:POCIError; num:POCINumber);cdecl;external ocilib name 'OCINumberSetPi';
{$ELSE}
  OCINumberSetPi : procedure (err:POCIError; num:POCINumber);cdecl;
{$ENDIF}
  {
     NAME: OCINumberSetPi - OCINumber Set number to Pi
          err (IN/OUT) - pointer to OCI error handle
          num (OUT) - set to zero value
     DESCRIPTION:
          Initialize the given number to value Pi.
    }
  {----------------------------- OCINumberAdd -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberAdd(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberAdd';
{$ELSE}
  OCINumberAdd : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberAdd - OCINumber ADD numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1, number2 (IN) - numbers to be added
          result (OUT) - result of adding 'number1' with 'number2'
     DESCRIPTION:
          Add 'number1' with 'number2' and return result in 'result'.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberSub -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberSub(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberSub';
{$ELSE}
  OCINumberSub : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberSub - OCINumber SUBtract numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1, number2 (IN) - 'number2' subtracted from 'number1'
          result (OUT) - subtraction result
     DESCRIPTION:
          Subtract 'number2' from 'number1' and return result in 'result'.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberMul -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberMul(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberMul';
{$ELSE}
  OCINumberMul : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberMul - OCINumber MULtiply numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1, number2 (IN) - numbers to be multiplied
          result (OUT) - multiplication result
     DESCRIPTION:
          Multiply 'number1' with 'number2' and return result in 'result'.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberDiv -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberDiv(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberDiv';
{$ELSE}
  OCINumberDiv : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberDiv - OCINumber DIVide numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1 (IN) - pointer to the numerator
          number2 (IN) - pointer to the denominator
          result (OUT) - division result
     DESCRIPTION:
          Divide 'number1' by 'number2' and return result in 'result'.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            underflow errorr
            overflow errorr
            divide by zero errorr
    }
  {----------------------------- OCINumberMod -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberMod(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberMod';
{$ELSE}
  OCINumberMod : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberMod - OCINumber MODulous
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1 (IN) - pointer to the numerator
          number2 (IN) - pointer to the denominator
          result (OUT) - remainder of the result
     DESCRIPTION:
          Finds the remainder of the division of two Oracle numbers.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            divide by zero errorr
    }
  {------------------------ OCINumberIntPower -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberIntPower(err:POCIError; base:POCINumber; exp:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberIntPower';
{$ELSE}
  OCINumberIntPower : function (err:POCIError; base:POCINumber; exp:sword; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberIntPower - OCINumber takes an arbitary base to an arbitary
                               integer PoWeR
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          base (IN) - base of the exponentiation
          exp (IN) - exponent to which the base is to be raised
          result (OUT) - output of exponentiation
     DESCRIPTION:
          Takes an arbitary base to an arbitary integer power.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {-------------------------- OCINumberShift --------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberShift(err:POCIError; number:POCINumber; nDig:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberShift';
{$ELSE}
  OCINumberShift : function (err:POCIError; number:POCINumber; nDig:sword; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberShift - OCINumber multiplies by a power of 10.
  
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - Oracle Number to be shifted.
          nDig   (IN) - number of decimal places to shift.
          result (OUT) - shift result.
     DESCRIPTION:
          Multiplies number by 10^NDig and sets product to the result.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberNeg -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberNeg(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberNeg';
{$ELSE}
  OCINumberNeg : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberNeg - OCINumber NEGate number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - number to be negated
          result (OUT) - will contain negated value of 'number'
     DESCRIPTION:
          Negates an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {------------------------- OCINumberToText --------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberToText(err:POCIError; number:POCINumber; fmt:Poratext; fmt_length:ub4; nls_params:Poratext;
             nls_p_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;external ocilib name 'OCINumberToText';
{$ELSE}
  OCINumberToText : function (err:POCIError; number:POCINumber; fmt:Poratext; fmt_length:ub4; nls_params:Poratext;
             nls_p_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberToText - OCINumber convert number TO String 
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - Oracle number to be converted
          fmt (IN) - conversion format
          fmt_length (IN) - length of the 'fmt' parameter
          nls_params (IN) - nls format specification, if null string 
                  i.e. (oratext *)0, then the default parameters for the 
                  session is used
          nls_p_length (IN) - length of the 'nls_params' parameter
          buf_size (IN/OUT) - size of the buffer must be passed as input by
                  the caller, this function will return the length of the 
                  resulting string in bytes via this parameter. The length 
                  does not include the terminating null ('\0').
          buf (OUT) - buffer into which the converted string is placed. The
                  resulting string is null terminated.
     DESCRIPTION:
          Converts the given number to a character string 
          according to the specified format. Refer to "TO_NUMBER" conversion
          function described in "Oracle SQL Language Reference Manual" for a
          description of format and NLS parameters.
          The converted number string is stored in the buffer 'buf', up to 
          a max of '*buf_size' bytes. Length of the resulting string is
          returned via 'buf_size'.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'buf' is null
            buffer too small
            invalid format
            invalid nls format
            number to text translation for the given format causes overflow
    }
  {-------------------------- OCINumberFromText ------------------------------ }
{$IFNDEF LinkDynamically}
  function OCINumberFromText(err:POCIError; str:Poratext; str_length:ub4; fmt:Poratext; fmt_length:ub4;
             nls_params:Poratext; nls_p_length:ub4; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberFromText';
{$ELSE}
  OCINumberFromText : function (err:POCIError; str:Poratext; str_length:ub4; fmt:Poratext; fmt_length:ub4;
             nls_params:Poratext; nls_p_length:ub4; number:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberFromText - OCINumber convert String TO Number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          str (IN) - input string to be converted to Oracle number
          str_length (IN) - size of the input string
          fmt (IN) - conversion format
          fmt_length (IN) - length of the 'fmt' parameter
          nls_params (IN) - nls format specification, if null string 
                  i.e. (oratext *)0, then the default parameters for the 
                  session is used
          nls_p_length (IN) - length of the 'nls_params' parameter
          number (OUT) - given string converted to number
     DESCRIPTION:
          Converts the given string to a number
          according to the specified format. Refer to "TO_NUMBER" conversion
          function described in "Oracle SQL Language Reference Manual" for a
          description of format and NLS parameters.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'str' is null
            'str_length' is 0
            invalid format
            invalid nls format
            invalid input string
    }
  {-------------------------- OCINumberToInt --------------------------------- }
  { Unsigned type -- ubX  }

  const
     OCI_NUMBER_UNSIGNED = 0;     
  { Signed type -- sbX  }
     OCI_NUMBER_SIGNED = 2;     

{$IFNDEF LinkDynamically}
  function OCINumberToInt(err:POCIError; number:POCINumber; rsl_length:uword; rsl_flag:uword; rsl:Pdvoid):sword;cdecl;external ocilib name 'OCINumberToInt';
{$ELSE}
var OCINumberToInt : function (err:POCIError; number:POCINumber; rsl_length:uword; rsl_flag:uword; rsl:Pdvoid):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberToInt - OCINumber convert number TO Integer
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - number to be converted
          rsl_length (IN) - size of the desired result
          rsl_s_flag (IN) - flag denoting the desired sign of the output; valid 
                  values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
          rsl (OUT) - pointer to space for the result
     DESCRIPTION:
          Native type conversion function.
          Converts the given Oracle number into an xbx (e.g. ub2, ub4, sb2 etc.)
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'rsl' is null
            integer value of 'number' is too big -- overflow
            integer value of 'number' is too small -- underflow
            invalid sign flag value ('rsl_s_flag')
    }
  {--------------------------- OCINumberFromInt ------------------------------ }
{$IFNDEF LinkDynamically}
  function OCINumberFromInt(err:POCIError; inum:Pdvoid; inum_length:uword; inum_s_flag:uword; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberFromInt';
{$ELSE}
  OCINumberFromInt : function (err:POCIError; inum:Pdvoid; inum_length:uword; inum_s_flag:uword; number:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberFromInt - OCINumber convert Integer TO Number 
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          inum (IN) - pointer to the integer to be converted
          inum_length (IN) - size of the integer
          inum_s_flag (IN) - flag that designates the sign of the integer; valid 
                  values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
          number (OUT) - given integer converted to Oracle number
     DESCRIPTION:
          Native type conversion function. Converts any Oracle standard
          machine-native integer type (xbx) to an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'inum' is null
            integer too BIG -- the number is too large to fit into an Oracle
                  number
            invalid sign flag value ('inum_s_flag')
    }
  {------------------------- OCINumberToReal --------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberToReal(err:POCIError; number:POCINumber; rsl_length:uword; rsl:Pdvoid):sword;cdecl;external ocilib name 'OCINumberToReal';
{$ELSE}
  OCINumberToReal : function (err:POCIError; number:POCINumber; rsl_length:uword; rsl:Pdvoid):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberToReal - OCINumber convert number TO Real
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - number to be converted
          rsl_length (IN) - is the size of the desired result, 
                  sizeof( float | double | long double)
          rsl (OUT) - pointer to space for storing the result
     DESCRIPTION:
          Native type conversion function. Converts an Oracle number into a
          machine-native real type. This function only converts numbers up to
          LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
          trailing zeroes. The above constants are defined in float.h
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'rsl' is null
            'rsl_length' is 0
    }
  {------------------------- OCINumberToRealArray ---------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberToRealArray(err:POCIError; var number:POCINumber; elems:uword; rsl_length:uword; rsl:Pdvoid):sword;cdecl;external ocilib name 'OCINumberToRealArray';
{$ELSE}
  OCINumberToRealArray : function (err:POCIError; var number:POCINumber; elems:uword; rsl_length:uword; rsl:Pdvoid):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberToRealArray - OCINumber convert array of numbers TO Real
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - Pointer to array of number to be converted
          elems (IN) - Upper bound of number array
          rsl_length (IN) - is the size of the desired result,
                                            sizeof( float | double | long double)
          rsl (OUT) - pointer to array of space for storing the result
     DESCRIPTION:
          Native type conversion function. Converts an Oracle number into a
          machine-native real type. This function only converts numbers up to
          LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
          trailing zeroes. The above constants are defined in float.h
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'rsl' is null
            'rsl_length' is 0
    }
  {-------------------------- OCINumberFromReal ------------------------------ }
{$IFNDEF LinkDynamically}
  function OCINumberFromReal(err:POCIError; rnum:Pdvoid; rnum_length:uword; number:POCINumber):sword;cdecl;external ocilib name 'OCINumberFromReal';
{$ELSE}
  OCINumberFromReal : function (err:POCIError; rnum:Pdvoid; rnum_length:uword; number:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberFromReal - OCINumber convert Real TO Number 
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          rnum (IN) - pointer to the floating point number to be converted
          rnum_length (IN) - size of the desired result, i.e.
                  sizeof(float | double | long double)
          number (OUT) - given float converted to Oracle number
     DESCRIPTION:
          Native type conversion function. Converts a machine-native floating
          point type to an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'number' or 'rnum' is null
            'rnum_length' is 0
    }
  {----------------------------- OCINumberCmp -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberCmp(err:POCIError; number1:POCINumber; number2:POCINumber; result:Psword):sword;cdecl;external ocilib name 'OCINumberCmp';
{$ELSE}
  OCINumberCmp : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:Psword):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberCmp - OCINumber CoMPare numbers 
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1, number2 (IN) - numbers to be compared
          result (OUT) - 0 if equal, negative if number1 < number2, 
                  positive if number1 > number2 
     DESCRIPTION:
          The function OCINumberCmp compares two numbers.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
              'number1' or 'number2' or 'result' is null 
    }
  {---------------------------- OCINumberSign -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberSign(err:POCIError; number:POCINumber; result:Psword):sword;cdecl;external ocilib name 'OCINumberSign';
{$ELSE}
  OCINumberSign : function (err:POCIError; number:POCINumber; result:Psword):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberSign - OCINumber obtains SiGN of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - number whose sign is returned
          result (OUT) - 0 if number == 0, -1 if number < 0, 
                  1 if number > 0 
     DESCRIPTION:
          Obtains sign of an Oracle number
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
              'number' or 'result' is null
    }
  {---------------------------- OCINumberIsZero ------------------------------ }
{$IFNDEF LinkDynamically}
  function OCINumberIsZero(err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;external ocilib name 'OCINumberIsZero';
{$ELSE}
  OCINumberIsZero : function (err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberIsZero - OCINumber comparison with ZERo
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - numbers to be compared
          result (OUT) - set to TRUE if equal to zero else FALSE
     DESCRIPTION:
          Test if the given number is equal to zero.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
              'number' or 'result' is null
    }
  {---------------------------- OCINumberIsInt ------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberIsInt(err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;external ocilib name 'OCINumberIsInt';
{$ELSE}
  OCINumberIsInt : function (err:POCIError; number:POCINumber; result:Pboolean):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberIsInt - OCINumber Is Integer value.
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - number to be tested
          result (OUT) - set to TRUE if integer value else FALSE
     DESCRIPTION:
          Test if the given number is an integer value.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
              'number' or 'result' is null
    }
  {-------------------------- OCINumberAssign -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberAssign(err:POCIError; from:POCINumber; cto:POCINumber):sword;cdecl;external ocilib name 'OCINumberAssign';
{$ELSE}
  OCINumberAssign : function (err:POCIError; from:POCINumber; cto:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberAssign - OCINumber ASsiGn number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          from (IN) - number to be assigned
          to (OUT) - number copied into
     DESCRIPTION:
          Assign number 'from' to 'to'.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            'from' or 'to' is null
    }
  {----------------------------- OCINumberAbs -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberAbs(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberAbs';
{$ELSE}
  OCINumberAbs : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberAbs - OCINumber compute ABSolute value
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - input number
          result (OUT) - output which will contain the absolue value of the
                  input number
     DESCRIPTION:
          Computes the absolute value of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {---------------------------- OCINumberCeil -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberCeil(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberCeil';
{$ELSE}
  OCINumberCeil : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberCeil - OCINumber compute the CEiL value of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - input number
          result (OUT) - output which will contain the ceil value of the
                  input number
     DESCRIPTION:
          Computes the ceil value of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {--------------------------- OCINumberFloor -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberFloor(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberFloor';
{$ELSE}
  OCINumberFloor : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberFloor - OCINumber compute the FLooR value of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - input number
          result (OUT) - output which will contain the floor value of the
                  input number
     DESCRIPTION:
          Computes the floor value of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberSqrt ------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberSqrt(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberSqrt';
{$ELSE}
  OCINumberSqrt : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberSqrt - OCINumber compute the SQuare Root of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - input number
          result (OUT) - output which will contain the square root of the
                  input number
     DESCRIPTION:
          Computes the square root of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            'number' is negative
    }
  {--------------------------- OCINumberTrunc -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberTrunc(err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberTrunc';
{$ELSE}
  OCINumberTrunc : function (err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberTrunc - OCINumber TRUncate an Oracle number at a 
                            specified decimal place
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - input number
          decplace (IN) - number of decimal digits to the right of the 
                  decimal point to truncate at. Negative values are allowed.
          result (OUT) - output of truncation
     DESCRIPTION:
          Truncate an Oracle number at a specified decimal place
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberPower ------------------------------ }
{$IFNDEF LinkDynamically}
  function OCINumberPower(err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberPower';
{$ELSE}
  OCINumberPower : function (err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberPower - OCINumber takes an arbitary Base to an 
                            arbitary Power
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          base (IN) - base of the exponentiation
          number (IN) - exponent to which the base is to be raised
          result (OUT) - output of exponentiation
     DESCRIPTION:
          Takes an arbitary base to an arbitary power.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {--------------------------- OCINumberRound -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberRound(err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberRound';
{$ELSE}
  OCINumberRound : function (err:POCIError; number:POCINumber; decplace:sword; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberRound - OCINumber ROUnds an Oracle number to a specified 
                    decimal place
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - round this number and return result in 'result'
          decplace (IN) - number of decimal digits to the right of the 
                  decimal point to round to. Negative values are allowed.
          result (OUT) - output of rounding
     DESCRIPTION:
          Rounds an Oracle number to a specified decimal place
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {--------------------------- OCINumberPrec --------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberPrec(err:POCIError; number:POCINumber; nDigs:eword; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberPrec';
{$ELSE}
  OCINumberPrec : function (err:POCIError; number:POCINumber; nDigs:eword; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberPrec - Rounds an Oracle number to a specified number of
                           decimal digits.
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - number for which to set precision.
          nDig   (IN) - number of decimal digits desired in the result.
          result (OUT) - result.
     DESCRIPTION:
          Performs a floating point round with respect to the number
          of digits.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberSin -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberSin(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberSin';
{$ELSE}
  OCINumberSin : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberSin - OCINumber takes the SINe of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the sine in radians
          result (OUT) - result of the sine
     DESCRIPTION:
          Takes the sine in radians of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {-------------------------- OCINumberArcSin -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberArcSin(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcSin';
{$ELSE}
  OCINumberArcSin : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberArcSin - OCINumber takes the Arc SINe of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the arc sine
          result (OUT) - result of the arc sine in radians
     DESCRIPTION:
          Takes the arc sine in radians of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            'number' is < -1 or 'number' is > 1.
    }
  {-------------------------- OCINumberHypSin -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberHypSin(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberHypSin';
{$ELSE}
  OCINumberHypSin : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberHypSin - OCINumber takes the SiNe Hyperbolic of an 
                             Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the sine hyperbolic
          result (OUT) - result of the sine hyperbolic
     DESCRIPTION:
          Takes the hyperbolic sine of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
     NOTES:
          An Oracle number overflow causes an unpredictable result value.
    }
  {----------------------------- OCINumberCos -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberCos(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberCos';
{$ELSE}
  OCINumberCos : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberCos - OCINumber takes the COSine of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the cosine in radians
          result (OUT) - result of the cosine
     DESCRIPTION:
          Takes the cosine in radians of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {-------------------------- OCINumberArcCos -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberArcCos(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcCos';
{$ELSE}
  OCINumberArcCos : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberArcCos - OCINumber takes the Arc COSine of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the arc cosine
          result (OUT) - result of the arc cosine in radians
     DESCRIPTION:
          Takes the arc cosine in radians of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            'number' is < -1 or 'number' is > 1.
    }
  {-------------------------- OCINumberHypCos -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberHypCos(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberHypCos';
{$ELSE}
  OCINumberHypCos : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberHypCos - OCINumber takes the CoSine Hyperbolic of an 
                             Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the cosine hyperbolic
          result (OUT) - result of the cosine hyperbolic
     DESCRIPTION:
          Takes the hyperbolic cosine of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
     NOTES:
          An Oracle number overflow causes an unpredictable result value.
    }
  {----------------------------- OCINumberTan -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberTan(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberTan';
{$ELSE}
  OCINumberTan : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberTan - OCINumber takes the TANgent of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the tangent in radians
          result (OUT) - result of the tangent
     DESCRIPTION:
          Takes the tangent in radians of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {-------------------------- OCINumberArcTan -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberArcTan(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcTan';
{$ELSE}
  OCINumberArcTan : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberArcTan - OCINumber takes the Arc TANgent of an Oracle number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the arc tangent
          result (OUT) - result of the arc tangent in radians
     DESCRIPTION:
          Takes the arc tangent in radians of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {------------------------ OCINumberArcTan2 --------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberArcTan2(err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberArcTan2';
{$ELSE}
  OCINumberArcTan2 : function (err:POCIError; number1:POCINumber; number2:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberArcTan2 - OCINumber takes the ATan2 of 2 Oracle numbers
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number1 (IN) - first argument of atan2(y,x) function which 
                  corresponds to 'y' parameter in the function
          number2 (IN) - second argument of atan2(y,x) function which 
                  corresponds to 'x' parameter in the function
          result (OUT) - result of the atan2() in radians
     DESCRIPTION:
          Takes the atan2(number1, number2).
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            'number2' is 0
    }
  {----------------------------- OCINumberHypTan ----------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberHypTan(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberHypTan';
{$ELSE}
  OCINumberHypTan : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberHypTan - OCINumber takes the TaNgent Hyperbolic of an Oracle
                             number
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - argument of the tangent hyperbolic
          result (OUT) - result of the tangent hyperbolic
     DESCRIPTION:
          Takes the hyperbolic tangent of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
     NOTES:
          An Oracle number overflow causes an unpredictable result value.
    }
  {--------------------------- OCINumberExp ---------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberExp(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberExp';
{$ELSE}
  OCINumberExp : function (err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberExp - OCINumber EXPonential
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - e raised to this Oracle number power
          result (OUT) - output of exponentiation
     DESCRIPTION:
          Raises e to the specified Oracle number power
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
    }
  {----------------------------- OCINumberLn --------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberLn(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberLn';
{$ELSE}
  OCINumberLn : function(err:POCIError; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberLn - OCINumber Logarithm Natural
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          number (IN) - logarithm of this number is computed
          result (OUT) - logarithm result
     DESCRIPTION:
          Takes the logarithm of the given Oracle number with respect
          to the given base.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            'number' is <= 0
    }
  {----------------------------- OCINumberLog -------------------------------- }
{$IFNDEF LinkDynamically}
  function OCINumberLog(err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;external ocilib name 'OCINumberLog';
{$ELSE}
  OCINumberLog : function (err:POCIError; base:POCINumber; number:POCINumber; result:POCINumber):sword;cdecl;
{$ENDIF}

  {
     NAME: OCINumberLog - OCINumber LOGarithm any base
     PARAMETERS:
          err (IN/OUT) - error handle. If there is an error, it is
                  recorded in 'err' and this function returns OCI_ERROR.
                  The error recorded in 'err' can be retrieved by calling
                  OCIErrorGet().
          base (IN) - base of the logarithm
          number (IN) - opearnd
          result (OUT) - logarithm result
     DESCRIPTION:
          Takes the logarithm with the specified base of an Oracle number.
     RETURNS:
          OCI_SUCCESS if the function completes successfully.
          OCI_INVALID_HANDLE if 'err' is NULL.
          OCI_ERROR if
            any of the number arguments is null
            'number' is <= 0
            'base' is <= 0
    }
  {*************************************************************************** }
  {                             ORACLE DATE TYPE                               }
  {*************************************************************************** }
  { hours; range is 0 <= hours <=23  }
  { minutes; range is 0 <= minutes <= 59  }
  { seconds; range is 0 <= seconds <= 59  }

  type
     POCITime = ^OCITime;
     OCITime = record
          OCITimeHH : ub1;
          OCITimeMI : ub1;
          OCITimeSS : ub1;
       end;

  { 
   * OCITime - OCI TiMe portion of date
   *
   * This structure should be treated as an opaque structure as the format
   * of this structure may change. Use OCIDateGetTime/OCIDateSetTime 
   * to manipulate time portion of OCIDate.
    }
  { gregorian year; range is -4712 <= year <= 9999  }
  { month; range is 1 <= month < 12  }
  { day; range is 1 <= day <= 31  }
  { time  }
     POCIDate = ^OCIDate;
     OCIDate = record
          OCIDateYYYY : sb2;
          OCIDateMM : ub1;
          OCIDateDD : ub1;
          OCIDateTime : OCITime;
       end;

  { 
   * OCIDate - OCI oracle Date representation in C
   *
   * OCIDate represents the C mapping of Oracle date.
   *
   * This structure should be treated as an opaque structure as the format
   * of this structure may change. Use OCIDateGetDate/OCIDateSetDate
   * to access/initialize OCIDate.
   *
   * For binding variables of type OCIDate in OCI calls (OCIBindByName(),
   * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_ODT.
    }
  {
     EXAMPLE 
  
     The following example shows how to manipulate an attribute of type 
     oracle date.
    
       #define FMT "Month dd, YYYY, HH:MI A.M."
       #define LANG "American"
  
       struct person
       
         OCIDate start_date;
       ;
       typedef struct person person;
  
       OCIError *err;
       person *joe;
       sword status;                                           /o error status o/
       
       /o See oci.h for an example of how to initialize OCIError.
        o For this example, assume the OCIEnv and OCIError has been
        o initialized.
        o/
  
       /o Pin joe person object in the object cache. See ori.h
        o for an example on pinning objects. For this example, assume that
        o joe is pointing to the pinned object.
        o/
  
       /o set the start date of joe o/
       OCIDateSetTime(&joe->start_date, 8, 0, 0);
       OCIDateSetDate(&joe->start_date, 1990, 10, 5); 
  
       /o check if the date is valid o/
       uword invalid;
       if (OCIDateCheck(err, &joe->start_date, &invalid) != OCI_SUCCESS)
         /o error handling code o/
       if (invalid)
         /o error handling code o/
  
       /o convert date for display purposes o/
       char str[100];
       ub4 strlen = sizeof(str);
       if (OCIDateToText(err, &joe->start_date, FMT, sizeof(FMT)-1, LANG,
                  sizeof(LANG)-1, &strlen, str) != OCI_SUCCESS)
         /o error handling code o/
  
    }
  {--------------------------- OCIDateGetTime -------------------------------- }
  { void OCIDateGetTime(/o_ CONST OCIDate *date, ub1 *hour, ub1 *min, 
                             ub1 *sec _o/);  }
(* error
  { \
in declaration at line 1787 *)

(* error
     *hour = (date)->OCIDateTime.OCITimeHH; \
 error
     *min = (date)->OCIDateTime.OCITimeMI; \
in declaration at line 1788
 error
     *min = (date)->OCIDateTime.OCITimeMI; \
 error
     *sec = (date)->OCIDateTime.OCITimeSS; \
in declaration at line 1789
 error
     *sec = (date)->OCIDateTime.OCITimeSS; \
 error
  } *)
    {
       NAME: OCIDateGetTime - OCIDate Get Time portion of date
       PARAMETERS:
            date (IN) - Oracle date whose time data is retrieved
            hour (OUT) - hour value returned
            min (OUT) - minute value returned
            sec (OUT) - second value returned
       DESCRIPTION:
            Return time inforamtion stored in the given date. The time
            information returned is: hour, minute and seconds.
       RETURNS:
            NONE
      }
    {--------------------------- OCIDateGetDate -------------------------------- }
    { void OCIDateGetDate(/o_ CONST OCIDate *date, sb2 *year, ub1 *month, 
                               ub1 *day _o/);  }
(*in declaration at line 1810 *)
(* error 
     *year = (date)->OCIDateYYYY; \
 error
     *month = (date)->OCIDateMM; \
in declaration at line 1811
 error
     *month = (date)->OCIDateMM; \
 error
     *day = (date)->OCIDateDD; \
in declaration at line 1812 *)
(* error
     *day = (date)->OCIDateDD; \
 error
  }
    {
       NAME: OCIDateGetDate - OCIDate Get Date (year, month, day) portion of date
       PARAMETERS:
            date (IN) - Oracle date whose year, month, day data is retrieved
            year (OUT) - year value returned
            month (OUT) - month value returned
            day (OUT) - day value returned
       DESCRIPTION:
            Return year, month, day inforamtion stored in the given date.
       RETURNS:
            NONE
      }
    {--------------------------- OCIDateSetTime -------------------------------- }
    { void OCIDateSetTime(/o_ OCIDate *date, ub1 hour, ub1 min, 
                               ub1 sec _o/);  }
in declaration at line 1832
 error
     (date)->OCIDateTime.OCITimeHH = hour; \
 error
     (date)->OCIDateTime.OCITimeMI = min; \
in declaration at line 1833
 error
     (date)->OCIDateTime.OCITimeMI = min; \
 error
     (date)->OCIDateTime.OCITimeSS = sec; \
in declaration at line 1834
 error
     (date)->OCIDateTime.OCITimeSS = sec; \
 error
  }
    {
       NAME: OCIDateSetTime - OCIDate Set Time portion of date
       PARAMETERS:
            date (OUT) - Oracle date whose time data is set
            hour (IN) - hour value to be set 
            min (IN) - minute value to be set
            sec (IN) - second value to be set
       DESCRIPTION:
            Set the date with the given time inforamtion.
       RETURNS:
            NONE
      }
    {--------------------------- OCIDateSetDate -------------------------------- }
    { void OCIDateSetDate(/o_ OCIDate *date, sb2 year, ub1 month, ub1 day _o/);  }
in declaration at line 1853 *)
(* error
     (date)->OCIDateYYYY = year; \
 error
     (date)->OCIDateMM = month; \
in declaration at line 1854
 error
     (date)->OCIDateMM = month; \
 error
     (date)->OCIDateDD = day; \
in declaration at line 1855
 error
     (date)->OCIDateDD = day; \
 error
  } *)
    {
       NAME: OCIDateSetDate - OCIDate Set Date (year, month, day) portion of date
       PARAMETERS:
            date (IN) - Oracle date whose year, month, day data is set
            year (OUT) - year value to be set
            month (OUT) - month value to be set
            day (OUT) - day value to be set
       DESCRIPTION:
            Set the date with the given year, month, day inforamtion.
       RETURNS:
            NONE
      }
    {--------------------------- OCIDateAssign --------------------------------- }
(*in declaration at line 1873 *)
    {
       NAME: OCIDateAssign - OCIDate Assignment
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            from (IN) - date to be assigned
            to (OUT) - lhs of assignment
       DESCRIPTION:
            Performs date assignment.
       RETURNS:
            OCI_SUCCESS
      }
    {--------------------------- OCIDateToText --------------------------------- }

{$IFNDEF LinkDynamically}
    function OCIDateToText(err:POCIError; date:POCIDate; fmt:Poratext; fmt_length:ub1; lang_name:Poratext;
               lang_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;external ocilib name 'OCIDateToText';
{$ELSE}
var OCIDateToText : function (err:POCIError; date:POCIDate; fmt:Poratext; fmt_length:ub1; lang_name:Poratext;
               lang_length:ub4; buf_size:Pub4; buf:Poratext):sword;cdecl;
{$ENDIF}


    {
       NAME: OCIDateToText - OCIDate convert date TO String 
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date (IN) - Oracle date to be converted
            fmt (IN) - conversion format, if null string pointer (oratext*)0, then
                    the date is converted to a character string in the
                    date format "DD-MON-YY".
            fmt_length (IN) - length of the 'fmt' parameter
            lang_name (IN) - specifies the language in which the names and 
                    abbreviations of months and days are returned;
                    default language of session is used if 'lang_name' 
                    is null i.e. (oratext *)0
            lang_length (IN) - length of the 'nls_params' parameter
            buf_size (IN/OUT) - size of the buffer; size of the resulting string
                    is returned via this parameter
            buf (OUT) - buffer into which the converted string is placed
       DESCRIPTION:
            Converts the given date to a string according to the specified format.
            Refer to "TO_DATE" conversion function described in
            "Oracle SQL Language Reference Manual" for a description of format
            and NLS arguments. The converted null-terminated date string is
            stored in the buffer 'buf'.
     
            An error is reported upon overflow, e.g. trying to convert a number
            of value 10 using format '9' causes an overflow.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              buffer too small
              invalid format
              unknown language
              overflow error
      }
    {---------------------------- OCIDateFromText ------------------------------ }
{$IFNDEF LinkDynamically}
    function OCIDateFromText(err:POCIError; date_str:Poratext; d_str_length:ub4; fmt:Poratext; fmt_length:ub1;
               lang_name:Poratext; lang_length:ub4; date:POCIDate):sword;cdecl;external ocilib name 'OCIDateFromText';
{$ELSE}
    OCIDateFromText : function (err:POCIError; date_str:Poratext; d_str_length:ub4; fmt:Poratext; fmt_length:ub1;
               lang_name:Poratext; lang_length:ub4; date:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateFromText - OCIDate convert String TO Date
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date_str (IN) - input string to be converted to Oracle date
            d_str_length (IN) - size of the input string, if the length is -1
                    then 'date_str' is treated as a null terminated  string
            fmt (IN) - conversion format; if 'fmt' is a null pointer, then
                    the string is expected to be in 'DD-MON-YY' format.
            fmt_length (IN) - length of the 'fmt' parameter
            lang_name (IN) - language in which the names and abbreviations of
                    days and months are specified, if null i.e. (oratext *)0,
                    the default language of session is used, 
            lang_length (IN) - length of the 'lang_name' parameter
            date (OUT) - given string converted to date
       DESCRIPTION:
            Converts the given string to Oracle date
            according to the specified format. Refer to "TO_DATE" conversion
            function described in "Oracle SQL Language Reference Manual" for a
            description of format.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid format
              unknown language
              invalid input string
              <to be discovered>
      }
    {----------------------------- OCIDateCompare ------------------------------ }
{$IFNDEF LinkDynamically}
    function OCIDateCompare(err:POCIError; date1:POCIDate; date2:POCIDate; result:Psword):sword;cdecl;external ocilib name 'OCIDateCompare';
{$ELSE}
    OCIDateCompare : function (err:POCIError; date1:POCIDate; date2:POCIDate; result:Psword):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateCompare - OCIDate CoMPare dates
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date1, date2 (IN) - dates to be compared
            result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
                    1 if date1 > date2
       DESCRIPTION:
            The function OCIDateCompare compares two dates. It returns -1 if date1 
            is smaller than date2, 0 if they are equal, and 1 if date1 is greater 
            than date2.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid date
              <to be discovered>
      }
    {------------------------- OCIDateAddMonths -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateAddMonths(err:POCIError; date:POCIDate; num_months:sb4; result:POCIDate):sword;cdecl;external ocilib name 'OCIDateAddMonths';
{$ELSE}
    OCIDateAddMonths : function (err:POCIError; date:POCIDate; num_months:sb4; result:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateAddMonths - OCIDate ADd or subtract Months
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date (IN) - 'num_months' added or subtracted from 'date'
            num_months (IN) - number of months to be added or subtracted 
                    (a negative value will be subtracted)
            result (IN/OUT) - result of adding or subtracting to 'date'
       DESCRIPTION:
            The function OCIDateAddDays adds or subtracts num_months from the 
            date 'date'.
              If the input 'date' is the last day of a month, then 
            appropriate adjustments are made to ensure that the output date is 
            also the last day of the month. For example, Feb. 28 + 1 month =
            March 31, and November 30 - 3 months = August 31. Otherwise the
            'result' date has the same day component as 'date'. 
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid date
              <to be discovered>
      }
    {--------------------------- OCIDateAddDays -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateAddDays(err:POCIError; date:POCIDate; num_days:sb4; result:POCIDate):sword;cdecl;external ocilib name 'OCIDateAddDays';
{$ELSE}
    OCIDateAddDays : function (err:POCIError; date:POCIDate; num_days:sb4; result:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateAddDays - OCIDate ADd or subtract Days
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date (IN) - 'num_days' added or subtracted from 'date'
            num_days (IN) - number of days to be added or subtracted 
                    (a negative value will be subtracted)
            result (IN/OUT) - result of adding or subtracting to 'date'
       DESCRIPTION:
            The function OCIDateAddDays adds or subtracts num_days from the 
            date 'date'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid date
              <to be discovered>
      }
    {--------------------------- OCIDateLastDay -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateLastDay(err:POCIError; date:POCIDate; last_day:POCIDate):sword;cdecl;external ocilib name 'OCIDateLastDay';
{$ELSE}
    OCIDateLastDay : function (err:POCIError; date:POCIDate; last_day:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateLastDay - OCIDate get date of the LaST day of the month
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date (IN) - input date
            last_day (OUT) - last day of the month in date 'date'
       DESCRIPTION:
            The function OCIDateLastDay returns the date of the last day of the
            month in date 'date'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid date
              <to be discovered>
      }
    {----------------------- OCIDateDaysBetween -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateDaysBetween(err:POCIError; date1:POCIDate; date2:POCIDate; num_days:Psb4):sword;cdecl;external ocilib name 'OCIDateDaysBetween';
{$ELSE}
    OCIDateDaysBetween : function (err:POCIError; date1:POCIDate; date2:POCIDate; num_days:Psb4):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date1, date2 (IN) - input dates
            num_days (OUT) - number of days between date1 and date2
       DESCRIPTION:
            The function OCIDateDaysBetween returns the number of days between 
            date1 and date2. The time is ignored in this computation.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid date
              <to be discovered>
      }
    {------------------------ OCIDateZoneToZone -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateZoneToZone(err:POCIError; date1:POCIDate; zon1:Poratext; zon1_length:ub4; zon2:Poratext;
               zon2_length:ub4; date2:POCIDate):sword;cdecl;external ocilib name 'OCIDateZoneToZone';
{$ELSE}
    OCIDateZoneToZone : function (err:POCIError; date1:POCIDate; zon1:Poratext; zon1_length:ub4; zon2:Poratext;
               zon2_length:ub4; date2:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateZoneToZone - OCIDate convert date from one Zone TO another Zone
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date1 (IN) - date to be converted
            zon1 (IN) - zone of input date
            zon1_length (IN) - length in bytes of string 'zon1'
            zon2 (IN) - zone to be converted to
            zon2_length (IN) - length in bytes of string 'zon2'
            date2 (OUT) - converted date (in 'zon2')
       DESCRIPTION:
            Converts date from one time zone to another. Given date 'date1' 
            in time zone 'zon1' returns date 'date2' in time zone 'zon2'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invlid date
              invald input time zone
              invald output time zone
              <to be discovered>
      }
    {--------------------------- OCIDateNextDay -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateNextDay(err:POCIError; date:POCIDate; day_p:Poratext; day_length:ub4; next_day:POCIDate):sword;cdecl;external ocilib name 'OCIDateNextDay';
{$ELSE}
    OCIDateNextDay : function (err:POCIError; date:POCIDate; day_p:Poratext; day_length:ub4; next_day:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateNextDay - OCIDate get date of Next DaY
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date (IN) - returned date should be later than this date
            day (IN) - first day of week named by this is returned
            day_length (IN) - length in bytes of string 'day'
            next_day (OUT) - first day of the week named by 'day' later than 'date'
       DESCRIPTION:
            Returns the date of the first day of the
            week named by 'day' that is later than date 'date'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              invalid date
              invalid day
              <to be discovered>
      }
    {----------------------------- OCIDateCheck -------------------------------- }
    { Listing of error bits used by OCIDateCheck()  }
    { Bad DAy  }

    const
       OCI_DATE_INVALID_DAY = $1;       
    { Bad DAy Low/high bit (1=low) }
       OCI_DATE_DAY_BELOW_VALID = $2;       
    { Bad MOnth  }
       OCI_DATE_INVALID_MONTH = $4;       
    { Bad MOnth Low/high bit (1=low) }
       OCI_DATE_MONTH_BELOW_VALID = $8;       
    { Bad YeaR  }
       OCI_DATE_INVALID_YEAR = $10;       
    { Bad YeaR Low/high bit (1=low) }
       OCI_DATE_YEAR_BELOW_VALID = $20;       
    { Bad HouR  }
       OCI_DATE_INVALID_HOUR = $40;       
    { Bad HouR Low/high bit (1=low) }
       OCI_DATE_HOUR_BELOW_VALID = $80;       
    { Bad MiNute  }
       OCI_DATE_INVALID_MINUTE = $100;       
       OCI_DATE_MINUTE_BELOW_VALID = $200;       
    { Bad MiNute Low/high bit (1=low) }
    { Bad SeCond  }
       OCI_DATE_INVALID_SECOND = $400;       
       OCI_DATE_SECOND_BELOW_VALID = $800;       
    { bad second Low/high bit (1=low) }
       OCI_DATE_DAY_MISSING_FROM_1582 = $1000;       
    { Day is one of those "missing" from 1582  }
    { Year may not equal zero  }
       OCI_DATE_YEAR_ZERO = $2000;       
    { Bad date format input  }
       OCI_DATE_INVALID_FORMAT = $8000;       
{$IFNDEF LinkDynamically}
    function OCIDateCheck(err:POCIError; date:POCIDate; valid:Puword):sword;cdecl;external ocilib name 'OCIDateCheck';
{$ELSE}
var OCIDateCheck : function(err:POCIError; date:POCIDate; valid:Puword):sword;cdecl;
{$ENDIF}


    {
       NAME: OCIDateCheck - OCIDate CHecK if the given date is valid
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            date (IN) - date to be checked
            valid (OUT) -  returns zero for a valid date, otherwise 
                    the ORed combination of all error bits specified below:
      
       Macro name                   Bit number      Error
       ----------                   ----------      -----
       OCI_DATE_INVALID_DAY         0x1             Bad day
       OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
       OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
       OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
       OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
       OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
       OCI_DATE_INVALID_HOUR        0x40            Bad HouR
       OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
       OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
       OCI_DATE_MINUTE_BELOW_VALID  0x200           Bad MiNute Low/high bit (1=low)
       OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
       OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
       OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
                                                    from 1582
       OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
       OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
      
       So, for example, if the date passed in was 2/0/1990 25:61:10 in
       (month/day/year hours:minutes:seconds format), the erroor returned
       would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
       OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
    
       DESCRIPTION:
            Check if the given date is valid.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              'date' and 'valid' pointers are NULL pointers
      }
    {--------------------------- OCIDateSysDate -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIDateSysDate(err:POCIError; sys_date:POCIDate):sword;cdecl;external ocilib name 'OCIDateSysDate';
{$ELSE}
    OCIDateSysDate : function (err:POCIError; sys_date:POCIDate):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIDateSysDate - OCIDate get current SYStem date and time
       PARAMETERS:
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            sys_date (OUT) - current system date and time
       DESCRIPTION:
            Returns the current system date and time.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'err' is NULL.
            OCI_ERROR if
              <to be discovered>
      }
    {*************************************************************************** }
    {                  FIXED-LENGTH STRING - CHAR (N)                            }
    {*************************************************************************** }
    {
     * An ADT attribute declared as "x CHAR(n)" is mapped to "OCIString *x;".
     * The representation of OCIString * is shown below.
      }
    {*************************************************************************** }
    {                  VARIABLE-LENGTH STRING                                    }
    {*************************************************************************** }
    {
     * The variable-length string is represented in C as a pointer to OCIString
     * structure. The OCIString structure is opaque to the user. Functions are
     * provided to allow the user to manipulate a variable-length string.
     *     
     * A variable-length string can be declared as:
     *
     * OCIString *vstr;
     *
     * For binding variables of type OCIString* in OCI calls (OCIBindByName(),
     * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_VST.
      }

    type
      POCIString = pointer;

    {-------------------------- OCIStringAssign -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIStringAssign(env:POCIEnv; err:POCIError; rhs:POCIString; var lhs:POCIString):sword;cdecl;external ocilib name 'OCIStringAssign';
{$ELSE}
var OCIStringAssign : function (env:POCIEnv; err:POCIError; rhs:POCIString; var lhs:POCIString):sword;cdecl;
{$ENDIF}


    {
       NAME: OCIStringAssign - OCIString Assign String to String
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            rhs (IN) - RHS of the assignment, the type of rhs is also OCIString
            lhs (IN/OUT) - LHS of the assignment
       DESCRIPTION:
            Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
            resized depending upon the size of the 'rhs'. The assigned string is
            null-terminated. The 'length' field will not include the extra byte
            needed for null termination.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              out of space error
      }
    {---------------------- OCIStringAssignText -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIStringAssignText(env:POCIEnv; err:POCIError; rhs:Poratext; rhs_len:ub4; var lhs:POCIString):sword;cdecl;external ocilib name 'OCIStringAssignText';
{$ELSE}
    OCIStringAssignText : function (env:POCIEnv; err:POCIError; rhs:Poratext; rhs_len:ub4; var lhs:POCIString):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIStringAssignText - OCIString Assign Text string to String
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            rhs (IN) - RHS of the assignment, the type of rhs is a text string
            rhs_len (IN) - length of the 'rhs' string
            lhs (IN/OUT) - LHS of the assignment
       DESCRIPTION:
            Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
            resized depending upon the size of the 'rhs'. The assigned string is
            null-terminated. The 'length' field will not include the extra byte
            needed for null termination.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              out of space error
      }
    {-------------------------- OCIStringResize -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIStringResize(env:POCIEnv; err:POCIError; new_size:ub4; var str:POCIString):sword;cdecl;external ocilib name 'OCIStringResize';
{$ELSE}
    OCIStringResize : function (env:POCIEnv; err:POCIError; new_size:ub4; var str:POCIString):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIStringResize - OCIString ReSiZe string memory
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            new_size (IN) - new memory size of the string in bytes
            str (IN/OUT) - allocated memory for the string is freed from the 
                    OOCI heap
       DESCRIPTION:
            This function resizes the memory of the given variable-length string in
            the object cache. The contents of the string are NOT preserved.
            This function may allocate the string in a new memory region in
            which case the original memory occupied by the given string will
            be freed. If the input string is null (str == NULL), then this
            function will allocate memory for the string.
     
            If the new_size is 0, then this function frees the memory occupied
            by 'str' and a null pointer value is returned.
     
            NOTE: The caller must compute 'new_size' taking into account space
            for the null character ('\0').
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              out of space error
      }
    {---------------------------- OCIStringSize -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIStringSize(env:POCIEnv; vs:POCIString):ub4;cdecl;external ocilib name 'OCIStringSize';
{$ELSE}
    OCIStringSize : function (env:POCIEnv; vs:POCIString):ub4;cdecl;
{$ENDIF}

    {
       NAME: OCIStringSize - OCIString Get String siZe
       PARAMETERS:
            env(IN) - pointer to OCI environment handle
            vs (IN) - string whose size is returned
       DESCRIPTION:
            Return the size of the given string.
       RETURNS:
            size of the string in bytes is returned
      }
    {----------------------------- OCIStringPtr -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIStringPtr(env:POCIEnv; vs:POCIString):Poratext;cdecl;external ocilib name 'OCIStringPtr';
{$ELSE}
    OCIStringPtr : function (env:POCIEnv; vs:POCIString):Poratext;cdecl;
{$ENDIF}

    {
       NAME: OCIStringPtr - OCIString Get String Pointer
       PARAMETERS:
            env(IN) - pointer to OCI environment handle
            vs (IN) - pointer to the text of this string is returned
       DESCRIPTION:
            Return the pointer to the text of the given string.
       RETURNS:
            pointer to the text of the string is returned
      }
    {----------------------- OCIStringAllocSize -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIStringAllocSize(env:POCIEnv; err:POCIError; vs:POCIString; allocsize:Pub4):sword;cdecl;external ocilib name 'OCIStringAllocSize';
{$ELSE}
    OCIStringAllocSize : function (env:POCIEnv; err:POCIError; vs:POCIString; allocsize:Pub4):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIStringAllocSize - OCIString get Allocated SiZe of string memory 
                                  in bytes
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            vs (IN) - string whose allocated size in bytes is returned
            allocsize (OUT) - allocated size of string memory in bytes is returned
       DESCRIPTION:
            Return the allocated size of the string memory in bytes. The
            allocated size is >= actual string size.
       REQUIRES:
            vs is a non-null pointer
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR on error
      }
    {*************************************************************************** }
    {                       VARIABLE-LENGTH RAW                                  }
    {*************************************************************************** }
    {
     * The variable-length raw is represented in C as a pointer to OCIRaw
     * structure. The OCIRaw structure is opaque to the user. Functions are
     * provided to allow the user to manipulate a variable-length raw.
     *     
     * A variable-length raw can be declared as:
     *
     * OCIRaw *raw;
     *
     * For binding variables of type OCIRaw* in OCI calls (OCIBindByName(),
     * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_LVB.
      }

    type
      POCIRaw = pointer;

    {-------------------------- OCIRawAssignRaw -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRawAssignRaw(env:POCIEnv; err:POCIError; rhs:POCIRaw; var lhs:POCIRaw):sword;cdecl;external ocilib name 'OCIRawAssignRaw';
{$ELSE}
var OCIRawAssignRaw : function (env:POCIEnv; err:POCIError; rhs:POCIRaw; var lhs:POCIRaw):sword;cdecl;
{$ENDIF}


    {
       NAME: OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw*) to
                       Raw (of type OCIRaw*)
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            rhs (IN) - RHS of the assignment, the type of rhs is also OCIRaw
            lhs (IN/OUT) - LHS of the assignment
       DESCRIPTION:
            Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
            resized depending upon the size of the 'rhs'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              out of space error
      }
    {------------------------ OCIRawAssignBytes -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRawAssignBytes(env:POCIEnv; err:POCIError; rhs:Pub1; rhs_len:ub4; var lhs:POCIRaw):sword;cdecl;external ocilib name 'OCIRawAssignBytes';
{$ELSE}
    OCIRawAssignBytes : function (env:POCIEnv; err:POCIError; rhs:Pub1; rhs_len:ub4; var lhs:POCIRaw):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIRawAssignBytes - OCIRaw Assign raw Bytes (of type ub1*) to Raw 
                       (of type OCIRaw*)
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            rhs (IN) - RHS of the assignment, the type of rhs is ub1 *
            rhs_len (IN) - length of the 'rhs' raw
            lhs (IN/OUT) - LHS of the assignment
       DESCRIPTION:
            Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
            resized depending upon the size of the 'rhs'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              out of space error
      }
    {---------------------------- OCIRawResize --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRawResize(env:POCIEnv; err:POCIError; new_size:ub4; var raw:POCIRaw):sword;cdecl;external ocilib name 'OCIRawResize';
{$ELSE}
    OCIRawResize : function (env:POCIEnv; err:POCIError; new_size:ub4; var raw:POCIRaw):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIRawResize - OCIRaw ReSiZe memory of variable-length raw
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            new_size (IN) - new size of the raw data in bytes
            raw (IN) - variable-length raw pointer; the raw is
                    resized to 'new_size'
       DESCRIPTION:
            This function resizes the memory of the given variable-length raw in
            the object cache. 
            The previous contents of the raw are NOT preserved.
            This function may allocate the raw in a new memory region in
            which case the original memory occupied by the given raw will
            be freed. If the input raw is null (raw == NULL), then this
            function will allocate memory for the raw data.
     
            If the new_size is 0, then this function frees the memory occupied
            by 'raw' and a null pointer value is returned.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              out of space error
      }
    {------------------------------- OCIRawSize -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRawSize(env:POCIEnv; raw:POCIRaw):ub4;cdecl;external ocilib name 'OCIRawSize';
{$ELSE}
    OCIRawSize : function (env:POCIEnv; raw:POCIRaw):ub4;cdecl;
{$ENDIF}

    {
       NAME: OCIRawSize - OCIRaw Get Raw siZe
       PARAMETERS:
            env (IN)  - pointer to OCI environment handle
            raw (INT) - raw whose size is returned
       DESCRIPTION:
            Return the size of the given raw.
       RETURNS:
            size of the raw in bytes is returned
      }
    {--------------------------------- OCIRawPtr ------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRawPtr(env:POCIEnv; raw:POCIRaw):Pub1;cdecl;external ocilib name 'OCIRawPtr';
{$ELSE}
    OCIRawPtr : function(env:POCIEnv; raw:POCIRaw):Pub1;cdecl;
{$ENDIF}

    {
       NAME: OCIRawPtr - OCIRaw Get Raw data Pointer
       PARAMETERS:
            env (IN) - pointer to OCI environment handle
            raw (IN) - pointer to the data of this raw is returned
       DESCRIPTION:
            Return the pointer to the data of the given raw.
       RETURNS:
            pointer to the data of the raw is returned
      }
    {------------------------------ OCIRawAllocSize ---------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRawAllocSize(env:POCIEnv; err:POCIError; raw:POCIRaw; allocsize:Pub4):sword;cdecl;external ocilib name 'OCIRawAllocSize';
{$ELSE}
    OCIRawAllocSize : function (env:POCIEnv; err:POCIError; raw:POCIRaw; allocsize:Pub4):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIRawAllocSize - OCIRaw get Allocated SiZe of raw memory in bytes
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            raw (IN) - raw whose allocated size in bytes is returned
            allocsize (OUT) - allocated size of raw memory in bytes is returned
       DESCRIPTION:
            Return the allocated size of the raw memory in bytes. The
            allocated size is >= actual raw size.
       REQUIRES:
            raw is a non-null pointer
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR upon error
      }
    {*************************************************************************** }
    {                     OBJECT REFERENCE OPERATIONS                            }
    {*************************************************************************** }
    { 
     * See the definition of OCIRef in oro.h.
     *
     * For binding variables of type OCIRef* in OCI calls (OCIBindByName(),
     * OCIBindByPos() and OCIDefineByPos()) use the code SQLT_REF.
     * 
      }
    {---------------------------- OCIRefClear ---------------------------------- }
{$IFNDEF LinkDynamically}
    procedure OCIRefClear(env:POCIEnv; ref:POCIRef);cdecl;external ocilib name 'OCIRefClear';
{$ELSE}
    OCIRefClear : procedure (env:POCIEnv; ref:POCIRef);cdecl;
{$ENDIF}

    {
       NAME: OCIRefClear - OCIRef CLeaR or nullify a ref
       PARAMETERS:
            env (IN)     - pointer to OCI environment handle
            ref (IN/OUT) - ref to clear
       DESCRIPTION:
            Clear or nullify the given ref. A ref is considered to be a null ref
            if it does not contain a valid OID (and thus doesn't point to an
            object). Logically, a null ref is a dangling ref.
    
            Note that a null ref is still a valid SQL value and is not SQL-ly null.
            It can be used as a valid non-null constant ref value for NOT NULL
            column or attribute of a row in a table.
            
            If a null pointer value is passed as a ref,
            then this function is a no-op.
      }
    {--------------------------- OCIRefAssign ---------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRefAssign(env:POCIEnv; err:POCIError; source:POCIRef; var target:POCIRef):sword;cdecl;external ocilib name 'OCIRefAssign';
{$ELSE}
    OCIRefAssign : function (env:POCIEnv; err:POCIError; source:POCIRef; var target:POCIRef):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIRefAssign - OCIRef CoPY a ref to another
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            source (IN) - ref to copy from
            target (IN/OUT) - ref to copy to
       DESCRIPTION:
            Copy 'source' ref to 'target' ref; both then reference the same
            object. If the target ref pointer is null (i.e. *target == NULL)
            then the copy function will allocate memory for the target ref
            in OOCI heap prior to the copy.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              1) out of memory
      }
    {-------------------------- OCIRefIsEqual ---------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRefIsEqual(env:POCIEnv; x:POCIRef; y:POCIRef):boolean;cdecl;external ocilib name 'OCIRefIsEqual';
{$ELSE}
    OCIRefIsEqual : function (env:POCIEnv; x:POCIRef; y:POCIRef):boolean;cdecl;
{$ENDIF}

    {
       NAME: OCIRefIsEqual - OCIRef compare two refs for EQUality
       PARAMETERS:
            env (IN) - pointer to OCI environment handle
            x (IN)   - ref to compare
            y (IN)   - ref to compare
       DESCRIPTION:
            Compare the given refs for equality.
            Two refs are equal if and only if:
              - they are both referencing the same persistent object, or
              - they are both referencing the same transient object.
    
            NOTE THAT TWO NULL REFS ARE CONSIDERED NOT EQUAL BY THIS FUNCTION.
       RETURNS:
            TRUE if the two refs are equal
            FALSE if the two refs are not equal, or X is NULL, or Y is NULL
      }
    {--------------------------- OCIRefIsNull ---------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRefIsNull(env:POCIEnv; ref:POCIRef):boolean;cdecl;external ocilib name 'OCIRefIsNull';
{$ELSE}
    OCIRefIsNull : function (env:POCIEnv; ref:POCIRef):boolean;cdecl;
{$ENDIF}

    {
       NAME: OCIRefIsNull - OCIRef test if a ref is NULl
       PARAMETERS:
            env (IN) - pointer to OCI environment handle
            ref (IN) - ref to test for null
       DESCRIPTION:
            Return TRUE if the given ref is null; otherwise, return FALSE.
            A ref is null if and only if:
            - it is supposed to be referencing a persistent object, but
              its OID is null, or
            - it is supposed to be referencing a transient object, but it is
              currently not pointing to an object.
            A ref is a dangling ref if the object that it points to does not
            exist.
       RETURNS:
            TRUE if the given ref is NULL
            FALSE if the given ref is not NULL
      }
    {-------------------------- OCIRefHexSize ---------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRefHexSize(env:POCIEnv; ref:POCIRef):ub4;cdecl;external ocilib name 'OCIRefHexSize';
{$ELSE}
    OCIRefHexSize : function (env:POCIEnv; ref:POCIRef):ub4;cdecl;
{$ENDIF}

    {
       NAME: OCIRefHexSize - OCIRef Hexadecimal buffer SiZe in bytes
       PARAMETERS:
            env (IN) - pointer to OCI environment handle
            ref (IN) - ref whose size in hexadecimal representation in bytes is
                    returned
       DESCRIPTION:
            Return the size of the buffer in bytes required for the hexadecimal
            representation of the ref. A buffer of at-least this size must be
            passed to ref-to-hex (OCIRefToHex) conversion function.
       RETURNS:
            size of hexadecimal representation of ref
      }
    {-------------------------- OCIRefFromHex --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRefFromHex(env:POCIEnv; err:POCIError; svc:POCISvcCtx; hex:Poratext; length:ub4;
               var ref:POCIRef):sword;cdecl;external ocilib name 'OCIRefFromHex';
{$ELSE}
    OCIRefFromHex : function (env:POCIEnv; err:POCIError; svc:POCISvcCtx; hex:Poratext; length:ub4;
               var ref:POCIRef):sword;cdecl;
{$ENDIF}

    {
       NAME:
            OCIRefFromHex - OCIRef convert a Hexadecimal string TO a Ref
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by
                    calling OCIErrorGet().
            svc (IN) - OCI service context handle; if the resulting ref is
                    initialized with this service context
            hex (IN) - hexadecimal string (that was produced by 'OCIRefToHex()"
                    previously) to be convert into a ref
            length (IN) - length of the hexadecimal string
            ref (IN/OUT) - ref is initialized with the given value ('hex').
                    If *ref is null, then space for the ref is allocated in the
                    object cache, otherwise the memory occupied by the given ref
                    is re-used.
       DESCRIPTION:
            Convert the given hexadecimal string into a ref. This function
            ensures that the resulting ref is well formed. It does NOT ensure
            that the object pointed to by the resulting ref exists or not.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
      }
    {--------------------------- OCIRefToHex ----------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIRefToHex(env:POCIEnv; err:POCIError; ref:POCIRef; hex:Poratext; hex_length:Pub4):sword;cdecl;external ocilib name 'OCIRefToHex';
{$ELSE}
    OCIRefToHex : function (env:POCIEnv; err:POCIError; ref:POCIRef; hex:Poratext; hex_length:Pub4):sword;cdecl;
{$ENDIF}

    {
       NAME:
            OCIRefToHex - OCIRef convert ref to a Hexadecimal string
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by
                    calling OCIErrorGet().
            ref (IN) - ref to be converted into a hexadecimal string; if the
                    ref is a null ref (i.e. OCIRefIsNull(ref) == TRUE) then
                    a zero hex_length value is returned
            hex (OUT) - buffer that is large enough to contain the resulting
                    hexadecimal string; the contents of the string is opaque
                    to the caller
            hex_length (IN/OUT) - on input specifies the size of the 'hex' buffer,
                    on output specifies the actual size of the hexadecimal
                    string being returned in 'hex'
       DESCRIPTION:
            Convert the given ref into a hexadecimal string, and return the length
            of the string. The resulting string is opaque to the caller.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              the given buffer is not big enough to hold the resulting string
      }
    {*************************************************************************** }
    {                          COLLECTION FUNCTIONS                              }
    {*************************************************************************** }
    { 
       The generic collection is represented by the type 'OCIColl'. The following
       operations OCIColl*() are provided on a generic collection:
         - get current size of collection
         - get upper bound of collection
         - get pointer to an element given its index
         - set element at given index (assign element)
         - append an element 
         - trim the given number of elements from the end of the collection
         - collection assignment
    
       The following iterator based scanning functions are also provided on a
       generic collection. These functions make use of an iterator which is
       defined to be of type OCIIter.
    
         - create an iterator for scanning collection
         - destroy iterator
         - reset iterator to the beginning of collection
         - get pointer to current element pointed by iterator
         - get pointer to next element
         - get pointer to previous element
    
       The collections variable-length array (varray) and nested table
       are sub-types of generic collection. This means that the OCIColl*() 
       functions can also be used to manipulate varray and nested table.
    
       The varray is represented by OCIArray type and nested table by OCITable.
       Besides OCIColl*() functions no additional functions are provided for
       manipulating varrays. The OCIColl*() functions are a complete set of 
       functions to manipulate varrays.
    
       Besides OCIColl*() functions, the following functions OCITable*() can be 
       used to manipulate nested table. The OCITable*() functions operate on 
       nested tables only and should not be used on a varray.
    
         - delete an element at index i. Note that the position
           ordinals of the remaining elements of the table is not changed by the
           delete operation. So delete creates "holes" in the table.
         - check if an element exists at the given index i
         - return the smallest value of i for which exists(i) is true
         - return the largest value of i for which exists(i) is true
         - return pointer to the smallest position j, greater than i, such that 
           OCITableExists(j) is true
         - return pointer to the largest position j, less than i, such that 
           OCITableExists(j) is true
    
       For binding variables of type OCIColl* or OCITable* in OCI calls
       (OCIBindByName(), OCIBindByPos() and OCIDefineByPos()) use the external
       type code SQLT_NTY.
      }
    { OCIColl - generic collection type  }
    type
       POCIColl = pointer;

    { OCIArray - varray collection type  }

       POCIArray = pointer;
//       POCIArray = ^OCIArray;
//       OCIArray = OCIColl;
    { OCITable - nested table collection type  }

       POCITable = pointer;
//       POCITable = ^OCITable;
//       OCITable = OCIColl;
    { OCIIter - collection iterator  }
       POCIIter = pointer;

    {----------------------------- OCICollSize --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollSize(env:POCIEnv; err:POCIError; coll:POCIColl; size:Psb4):sword;cdecl;external ocilib name 'OCICollSize';
{$ELSE}
var OCICollSize : function (env:POCIEnv; err:POCIError; coll:POCIColl; size:Psb4):sword;cdecl;
{$ENDIF}


    {
       NAME: OCICollSize - OCIColl return current SIZe of the given collection
       PARAMETERS:
            env(IN) - pointer to OCI environment handle
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            coll (IN) - collection whose number of elements is returned
            size (OUT) - current number of elements in the collection
       DESCRIPTION:
              Returns the current number of elements in the given collection.
    
              For collections of type nested table wherein 'delete element'
              operation is allowed, the count returned by OCICollSize() will
              NOT be decremented upon deleting elements. For example:
    
                OCICollSize(...); 
                // assume 'size' returned is equal to 5
                OCITableDelete(...); // delete one element
                OCICollSize(...);
                // 'size' returned will still be 5
    
              To get the count minus the deleted elements use OCITableSize(). 
              Continuing the above example,
    
                OCITableSize(...)
                // 'size' returned will be equal to 4
    
              Note, a trim operation (OCICollTrim) will decrement the count 
              by the number of trimmed elements. Continuing the above example,
    
                OCICollTrim(..,1..); // trim one element
                OCICollSize(...);
                // 'size' returned will be equal to 4
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              error during loading of collection into object cache
              any of the input parameters is null
      }
    {------------------------------ OCICollMax --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollMax(env:POCIEnv; coll:POCIColl):sb4;cdecl;external ocilib name 'OCICollMax';
{$ELSE}
    OCICollMax : function (env:POCIEnv; coll:POCIColl):sb4;cdecl;
{$ENDIF}

    {
       NAME: OCICollMax - OCIColl return MAXimum size (upper-bound) of the
                       given collection (in number of elements)
       PARAMETERS:
            env(IN) - pointer to OCI environment handle
            coll (IN) - collection whose upper-bound in number of elements 
                    is returned
       DESCRIPTION:
            Returns the max number of elements that the given collection can hold.
            A value 0 indicates that the collection has no upper-bound.
       REQUIRES:
            coll must point to a valid collection descriptor
       RETURNS:
            upper-bound of the given collection
      }
    {-------------------------- OCICollGetElem --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollGetElem(env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
               elem:PPdvoid; elemind:PPdvoid):sword;cdecl;external ocilib name 'OCICollGetElem';
{$ELSE}
    OCICollGetElem : function (env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
               elem:PPdvoid; elemind:PPdvoid):sword;cdecl;
{$ENDIF}

    {
       NAME: OCICollGetElem - OCIColl GET pointer to the element at the given index
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            coll (IN) - pointer to the element in this collection is returned
            index (IN) - index of the element whose pointer is returned
            exists (OUT) - set to FALSE if element at the specified index does 
                    not exist else TRUE
            elem (OUT) - address of the desired element is returned
            elemind (OUT) [optional] - address of the null indicator information 
                    is returned; if (elemind == NULL) then the null indicator
                    information will NOT be returned
       DESCRIPTION:
            Get the address of the element at the given position. Optionally
            this function also returns the address of the element's null indicator
            information.
     
            The following table describes for each collection element type
            what the corresponding element pointer type is. The element pointer
            is returned via the 'elem' parameter of OCICollGetElem().
     
               Element Type                       *elem is set to
            -----------------------               ---------------
             Oracle Number (OCINumber)              OCINumber*
             Date (OCIDate)                         OCIDate*
             Variable-length string (OCIString*)    OCIString**
             Variable-length raw (OCIRaw*)          OCIRaw**
             object reference (OCIRef*)             OCIRef**
             lob locator (OCILobLocator*)           OCILobLocator**
             object type (e.g. person)              person*
     
            The element pointer returned by OCICollGetElem() is in a form
            such that it can not only be used to access the
            element data but also is in a form that can be used as the target
            (i.e left-hand-side) of an assignment statement.
     
            For example, assume the user is iterating over the elements of
            a collection whose element type is object reference (OCIRef*). A call
            to OCICollGetElem() returns pointer to a reference handle
            (i.e. OCIRef**). After getting, the pointer to the collection
            element, the user may wish to modify it by assigning a new reference.
            This can be accomplished via the ref assignment function shown below:
     
            sword OCIRefAssign( OCIEnv *env, OCIError *err, CONST OCIRef *source,
                                OCIRef **target );
     
            Note that the 'target' parameter of OCIRefAssign() is of type
            'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
            If '*target == NULL' a new ref will be allocated by OCIRefAssign()
            and returned via the 'target' parameter.
     
            Similarly, if the collection element was of type string (OCIString*),
            OCICollGetElem() returns pointer to string handle
            (i.e. OCIString**). If a new string is assigned, via
            OCIStringAssign() or OCIStringAssignText() the type of the target
            must be 'OCIString **'.
     
            If the collection element is of type Oracle number, OCICollGetElem()
            returns OCINumber*. The prototype of OCINumberAssign() is shown below:
     
            sword OCINumberAssign(OCIError *err, CONST OCINumber *from,
                                  OCINumber *to);
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {------------------------- OCICollGetElemArray ----------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollGetElemArray(env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
               elem:PPdvoid; elemind:PPdvoid; nelems:Puword):sword;cdecl;external ocilib name 'OCICollGetElemArray';
{$ELSE}
    OCICollGetElemArray : function (env:POCIEnv; err:POCIError; coll:POCIColl; index:sb4; exists:Pboolean;
               elem:PPdvoid; elemind:PPdvoid; nelems:Puword):sword;cdecl;
{$ENDIF}

    {
       NAME: OCICollGetElemArray - OCIColl GET pointers to elements from given index
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            coll (IN) - pointers to the elements in this collection is returned
            index (IN) - starting index of the element
            exists (OUT) - set to FALSE if element at the specified index does 
                    not exist else TRUE
            elem (OUT) - address of the desired elements is returned
            elemind (OUT) [optional] - address of the null indicators information 
                    is returned; if (elemind == NULL) then the null indicator
                    information will NOT be returned
            nelems(IN/OUT) - Upper bound of elem and/or elemind array
       DESCRIPTION:
            Get the address of the elements from the given position. Optionally
            this function also returns the address of the element's null indicator
            information.
     
            The following table describes for each collection element type
            what the corresponding element pointer type is. The element pointer
            is returned via the 'elem' parameter of OCICollGetElem().
     
               Element Type                       *elem is set to
            -----------------------               ---------------
             Oracle Number (OCINumber)              OCINumber*
             Date (OCIDate)                         OCIDate*
             Variable-length string (OCIString*)    OCIString**
             Variable-length raw (OCIRaw*)          OCIRaw**
             object reference (OCIRef*)             OCIRef**
             lob locator (OCILobLocator*)           OCILobLocator**
             object type (e.g. person)              person*
     
            The element pointer returned by OCICollGetElem() is in a form
            such that it can not only be used to access the
            element data but also is in a form that can be used as the target
            (i.e left-hand-side) of an assignment statement.
     
            For example, assume the user is iterating over the elements of
            a collection whose element type is object reference (OCIRef*). A call
            to OCICollGetElem() returns pointer to a reference handle
            (i.e. OCIRef**). After getting, the pointer to the collection
            element, the user may wish to modify it by assigning a new reference.
            This can be accomplished via the ref assignment function shown below:
     
            sword OCIRefAssign( OCIEnv *env, OCIError *err, CONST OCIRef *source,
                                OCIRef **target );
     
            Note that the 'target' parameter of OCIRefAssign() is of type
            'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
            If '*target == NULL' a new ref will be allocated by OCIRefAssign()
            and returned via the 'target' parameter.
     
            Similarly, if the collection element was of type string (OCIString*),
            OCICollGetElem() returns pointer to string handle
            (i.e. OCIString**). If a new string is assigned, via
            OCIStringAssign() or OCIStringAssignText() the type of the target
            must be 'OCIString **'.
     
            If the collection element is of type Oracle number, OCICollGetElem()
            returns OCINumber*. The prototype of OCINumberAssign() is shown below:
     
            sword OCINumberAssign(OCIError *err, CONST OCINumber *from,
                                  OCINumber *to);
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {----------------------- OCICollAssignElem --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollAssignElem(env:POCIEnv; err:POCIError; index:sb4; elem:Pdvoid; elemind:Pdvoid;
               coll:POCIColl):sword;cdecl;external ocilib name 'OCICollAssignElem';
{$ELSE}
    OCICollAssignElem : function (env:POCIEnv; err:POCIError; index:sb4; elem:Pdvoid; elemind:Pdvoid;
               coll:POCIColl):sword;cdecl;
{$ENDIF}

    {
       NAME: OCICollAssignElem - OCIColl ASsign Element
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            index (IN) - index of the element whose is assigned to
            elem (IN) - element which is assigned from (source element)
            elemind (IN) [optional] - pointer to the element's null indicator 
                    information; if (elemind == NULL) then the null indicator
                    information of the assigned element will be set to non-null.
            coll (IN/OUT) - collection to be updated
       DESCRIPTION:
            Assign the given element value 'elem' to the element at coll[index].
            If the collection is of type nested table, the element at the given 
            index may not exist (i.e. may have been deleted). In this case, the 
            given element is inserted at index 'index'.
            Otherwise, the element at index 'index' is updated with the value
            of 'elem'.
      
            Note that the given element is deep-copied and 
            'elem' is strictly an input parameter.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              out of memory error
              given index is out of bounds of the given collection
      }
    {--------------------------- OCICollAssign --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollAssign(env:POCIEnv; err:POCIError; rhs:POCIColl; lhs:POCIColl):sword;cdecl;external ocilib name 'OCICollAssign';
{$ELSE}
    OCICollAssign : function (env:POCIEnv; err:POCIError; rhs:POCIColl; lhs:POCIColl):sword;cdecl;
{$ENDIF}

    {
       NAME: OCICollAssign - OCIColl ASsiGn collection
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            rhs (IN) - collection to be assigned from
            lhs (OUT) - collection to be assigned to
       DESCRIPTION:
            Assign 'rhs' to 'lhs'. The 'lhs' collection may be decreased or 
            increased depending upon the size of 'rhs'. If the 'lhs' contains 
            any elements then the elements will be deleted prior to the 
            assignment. This function performs a deep-copy. The memory for the 
            elements comes from the object cache.
     
            An error is returned if the element types of the lhs and rhs 
            collections do not match. Also, an error is returned if the 
            upper-bound of the lhs collection is less than the current number of 
            elements in the rhs collection.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              out of memory error
              type mis-match of lhs and rhs collections
              upper-bound of lhs collection is less than the current number of 
              elements in the rhs collection
      }
    {--------------------------- OCICollAppend --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollAppend(env:POCIEnv; err:POCIError; elem:Pdvoid; elemind:Pdvoid; coll:POCIColl):sword;cdecl;external ocilib name 'OCICollAppend';
{$ELSE}
    OCICollAppend : function (env:POCIEnv; err:POCIError; elem:Pdvoid; elemind:Pdvoid; coll:POCIColl):sword;cdecl;
{$ENDIF}

    {
       NAME: OCICollAppend - OCIColl APPend collection
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            elem (IN) - pointer to the element which is appended to the end
                    of the given collection
            elemind (IN) [optional] - pointer to the element's null indicator 
                    information; if (elemind == NULL) then the null indicator
                    information of the appended element will be set to non-null.
            coll (IN/OUT) - updated collection
       DESCRIPTION:
            Append the given element to the end of the given collection. 
            Appending an element is equivalent to:
              - increasing the size of the collection by 1 element
              - updating (deep-copying) the last element's data with the given 
                element's data
      
            Note that the pointer to the given element 'elem' will not be saved 
            by this function. So 'elem' is strictly an input parameter.
            An error is returned if the current size of the collection
            is equal to the max size (upper-bound) of the collection prior to 
            appending the element.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              out of memory error
              current size of collection == max size of the collection
      }
    {----------------------------- OCICollTrim --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCICollTrim(env:POCIEnv; err:POCIError; trim_num:sb4; coll:POCIColl):sword;cdecl;external ocilib name 'OCICollTrim';
{$ELSE}
    OCICollTrim : function (env:POCIEnv; err:POCIError; trim_num:sb4; coll:POCIColl):sword;cdecl;
{$ENDIF}

    {
       NAME: OCICollTrim - OCIColl Trim elements from the end of the collection
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            trim_num (IN) - number of elements to trim
            coll (IN/OUT) - 'trim_num' of elements are removed (freed) from the
                    end of the collection
       DESCRIPTION:
            Trim the collection by the given number of elements. The elements are 
            removed from the end of the collection.
      
            An error is returned if the 'trim_num' is greater than the current 
            size of the collection.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              'trim_num' is greater than the current size of the collection.
      }
    {--------------------------- OCICollIsLocator ------------------------------ }
{$IFNDEF LinkDynamically}
    function OCICollIsLocator(env:POCIEnv; err:POCIError; coll:POCIColl; result:Pboolean):sword;cdecl;external ocilib name 'OCICollIsLocator';
{$ELSE}
    OCICollIsLocator : function (env:POCIEnv; err:POCIError; coll:POCIColl; result:Pboolean):sword;cdecl;
{$ENDIF}

    {
    Name: OCICollIsLocator - OCIColl indicates whether a collection is locator
                             based or not.
    Parameters:
            env(IN) - pointer to OCI environment handle
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            coll (IN) - collection item.
            result (OUT) - TRUE if the collection item is a locator, FALSE
                           otherwise
    Description:
            Returns TRUE in the result OUT parameter if the collection item is a
            locator, otherwise returns FALSE.
    Returns:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
     }
    {---------------------------- OCIIterCreate -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIIterCreate(env:POCIEnv; err:POCIError; coll:POCIColl; var itr:POCIIter):sword;cdecl;external ocilib name 'OCIIterCreate';
{$ELSE}
    OCIIterCreate : function (env:POCIEnv; err:POCIError; coll:POCIColl; var itr:POCIIter):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIIterCreate - OCIColl Create an ITerator to scan the collection
                          elements
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            coll (IN) - collection which will be scanned; the different 
                    collection types are varray and nested table
            itr (OUT) - address to the allocated collection iterator is
                    returned by this function
       DESCRIPTION:
            Create an iterator to scan the elements of the collection. The
            iterator is created in the object cache. The iterator is initialized
            to point to the beginning of the collection.
      
            If the next function (OCIIterNext) is called immediately 
            after creating the iterator then the first element of the collection 
            is returned. 
            If the previous function (OCIIterPrev) is called immediately after 
            creating the iterator then "at beginning of collection" error is 
            returned.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              out of memory error
      }
    {----------------------------- OCIIterDelete ------------------------------ }
{$IFNDEF LinkDynamically}
    function OCIIterDelete(env:POCIEnv; err:POCIError; var itr:POCIIter):sword;cdecl;external ocilib name 'OCIIterDelete';
{$ELSE}
    OCIIterDelete : function (env:POCIEnv; err:POCIError; var itr:POCIIter):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIIterDelete - OCIColl Delete ITerator
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            itr (IN/OUT) - the allocated collection iterator is destroyed and
                    the 'itr' is set to NULL prior to returning
       DESCRIPTION:
            Delete the iterator which was previously created by a call to 
            OCIIterCreate.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              to be discovered
      }
    {----------------------------- OCIIterInit --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIIterInit(env:POCIEnv; err:POCIError; coll:POCIColl; itr:POCIIter):sword;cdecl;external ocilib name 'OCIIterInit';
{$ELSE}
    OCIIterInit : function (env:POCIEnv; err:POCIError; coll:POCIColl; itr:POCIIter):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIIterInit - OCIColl Initialize ITerator to scan the given 
                       collection
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            coll (IN) - collection which will be scanned; the different 
                    collection types are varray and nested table
            itr (IN/OUT) - pointer to an allocated  collection iterator
       DESCRIPTION:
            Initializes the given iterator to point to the beginning of the 
            given collection. This function can be used to:
      
            a. reset an iterator to point back to the beginning of the collection 
            b. reuse an allocated iterator to scan a different collection
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {------------------------ OCIIterGetCurrent -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIIterGetCurrent(env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid):sword;cdecl;external ocilib name 'OCIIterGetCurrent';
{$ELSE}
    OCIIterGetCurrent : function (env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIIterGetCurrent - OCIColl Iterator based, get CURrent collection
                        element
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            itr (IN) - iterator which points to the current element
            elem (OUT) - address of the element pointed by the iterator is returned
            elemind (OUT) [optional] - address of the element's null indicator 
                    information is returned; if (elemind == NULL) then the null 
                    indicator information will NOT be returned
       DESCRIPTION:
            Returns pointer to the current element and its corresponding null
            information.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {------------------------------ OCIIterNext -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIIterNext(env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
               eoc:Pboolean):sword;cdecl;external ocilib name 'OCIIterNext';
{$ELSE}
    OCIIterNext : function (env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
               eoc:Pboolean):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIIterNext - OCIColl Iterator based, get NeXT collection element
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            itr (IN/OUT) - iterator is updated to point to the next element
            elem (OUT) - after updating the iterator to point to the next element,
                    address of the element is returned
            elemind (OUT) [optional] - address of the element's null indicator 
                    information is returned; if (elemind == NULL) then the null 
                    indicator information will NOT be returned
            eoc (OUT) - TRUE if iterator is at End Of Collection (i.e. next
                    element does not exist) else FALSE
       DESCRIPTION:
            Returns pointer to the next element and its corresponding null
            information. The iterator is updated to point to the next element.
      
            If the iterator is pointing to the last element of the collection
            prior to executing this function, then calling this function will 
            set eoc flag to TRUE. The iterator will be left unchanged in this
            situation.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {------------------------------ OCIIterPrev -------------------------------- }
{$IFNDEF LinkDynamically}
    function OCIIterPrev(env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
               boc:Pboolean):sword;cdecl;external ocilib name 'OCIIterPrev';
{$ELSE}
    OCIIterPrev : function (env:POCIEnv; err:POCIError; itr:POCIIter; elem:PPdvoid; elemind:PPdvoid;
               boc:Pboolean):sword;cdecl;
{$ENDIF}

    {
       NAME: OCIIterPrev - OCIColl Iterator based, get PReVious collection element
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            itr (IN/OUT) - iterator is updated to point to the previous 
                    element
            elem (OUT) - after updating the iterator to point to the previous 
                    element, address of the element is returned
            elemind (OUT) [optional] - address of the element's null indicator 
                    information is returned; if (elemind == NULL) then the null 
                    indicator information will NOT be returned
            boc (OUT) - TRUE if iterator is at Beginning Of Collection (i.e.
                    previous element does not exist) else FALSE.
       DESCRIPTION:
            Returns pointer to the previous element and its corresponding null
            information. The iterator is updated to point to the previous element.
      
            If the iterator is pointing to the first element of the collection
            prior to executing this function, then calling this function will 
            set 'boc' to TRUE. The iterator will be left unchanged in this 
            situation.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {*************************************************************************** }
    {           FUNCTIONS WHICH OPERATE ONLY ON NESTED TABLE OCITable*()         }
    {*************************************************************************** }
    {---------------------------- OCITableSize --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITableSize(env:POCIEnv; err:POCIError; tbl:POCITable; size:Psb4):sword;cdecl;external ocilib name 'OCITableSize';
{$ELSE}
    OCITableSize : function (env:POCIEnv; err:POCIError; tbl:POCITable; size:Psb4):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITableSize - OCITable return current SIZe of the given 
                       nested table (not including deleted elements)
       PARAMETERS:
            env(IN) - pointer to OCI environment handle
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            tbl (IN) - nested table whose number of elements is returned
            size (OUT) - current number of elements in the nested table. The count
                    does not include deleted elements.
       DESCRIPTION:
            Returns the count of elements in the given nested table. 
    
            The count returned by OCITableSize() will be decremented upon 
            deleting elements from the nested table. So, this count DOES NOT 
            includes any "holes" created by deleting elements. 
            For example:
    
                OCITableSize(...); 
                // assume 'size' returned is equal to 5
                OCITableDelete(...); // delete one element
                OCITableSize(...);
                // 'size' returned will be equal to 4
    
            To get the count plus the count of deleted elements use 
            OCICollSize(). Continuing the above example,
    
                OCICollSize(...)
                // 'size' returned will still be equal to 5
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              error during loading of nested table into object cache
              any of the input parameters is null
      }
    {---------------------- OCITableExists --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITableExists(env:POCIEnv; err:POCIError; tbl:POCITable; index:sb4; exists:Pboolean):sword;cdecl;external ocilib name 'OCITableExists';
{$ELSE}
    OCITableExists : function (env:POCIEnv; err:POCIError; tbl:POCITable; index:sb4; exists:Pboolean):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITableExists - OCITable test whether element at the given index
                        EXIsts
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            tbl (IN) - table in which the given index is checked
            index (IN) - index of the element which is checked for existence
            exists (OUT) - set to TRUE if element at given 'index' exists
                    else set to FALSE
       DESCRIPTION:
            Test whether an element exists at the given 'index'.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
      }
    {--------------------------- OCITableDelete ------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITableDelete(env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable):sword;cdecl;external ocilib name 'OCITableDelete';
{$ELSE}
    OCITableDelete : function (env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITableDelete - OCITable DELete element at the specified index
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            index (IN) - index of the element which must be deleted
            tbl (IN) - table whose element is deleted
       DESCRIPTION:
            Delete the element at the given 'index'. Note that the position
            ordinals of the remaining elements of the table is not changed by the
            delete operation. So delete creates "holes" in the table.
    
            An error is returned if the element at the specified 'index' has
            been previously deleted.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              any of the input parameters is null
              given index is not valid
      }
    {--------------------------- OCITableFirst --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITableFirst(env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;external ocilib name 'OCITableFirst';
{$ELSE}
    OCITableFirst : function (env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITableFirst - OCITable return FirST index of table
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            tbl (IN) - table which is scanned
            index (OUT) - first index of the element which exists in the given 
                    table is returned
       DESCRIPTION:
            Return the first index of the element which exists in the given 
            table. 
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              table is empty
      }
    {---------------------------- OCITableLast --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITableLast(env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;external ocilib name 'OCITableLast';
{$ELSE}
    OCITableLast : function (env:POCIEnv; err:POCIError; tbl:POCITable; index:Psb4):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITableFirst - OCITable return LaST index of table
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            tbl (IN) - table which is scanned
            index (OUT) - last index of the element which exists in the given 
                    table is returned
       DESCRIPTION:
            Return the last index of the element which exists in the given 
            table. 
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              table is empty
      }
    {---------------------------- OCITableNext --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITableNext(env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; next_index:Psb4;
               exists:Pboolean):sword;cdecl;external ocilib name 'OCITableNext';
{$ELSE}
    OCITableNext : function (env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; next_index:Psb4;
               exists:Pboolean):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITableNext - OCITable return NeXT available index of table
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            index (IN) - starting at 'index' the index of the next element
                    which exists is returned
            tbl (IN) - table which is scanned
            next_index (OUT) - index of the next element which exists 
                    is returned
            exists (OUT) - FALSE if no next index available else TRUE
       DESCRIPTION:
            Return the smallest position j, greater than 'index', such that 
            exists(j) is TRUE.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              no next index available
      }
    {---------------------------- OCITablePrev --------------------------------- }
{$IFNDEF LinkDynamically}
    function OCITablePrev(env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; prev_index:Psb4;
               exists:Pboolean):sword;cdecl;external ocilib name 'OCITablePrev';
{$ELSE}
    OCITablePrev : function (env:POCIEnv; err:POCIError; index:sb4; tbl:POCITable; prev_index:Psb4;
               exists:Pboolean):sword;cdecl;
{$ENDIF}

    {
       NAME: OCITablePrev - OCITable return PReVious available index of table
       PARAMETERS:
            env (IN/OUT) - OCI environment handle initialized in object mode.
            err (IN/OUT) - error handle. If there is an error, it is
                    recorded in 'err' and this function returns OCI_ERROR.
                    The error recorded in 'err' can be retrieved by calling
                    OCIErrorGet().
            index (IN) - starting at 'index' the index of the previous element
                    which exists is returned
            tbl (IN) - table which is scanned
            prev_index (OUT) - index of the previous element which exists 
                    is returned
            exists (OUT) - FALSE if no next index available else TRUE
       DESCRIPTION:
            Return the largest position j, less than 'index', such that 
            exists(j) is TRUE.
       RETURNS:
            OCI_SUCCESS if the function completes successfully.
            OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
            OCI_ERROR if
              no previous index available
      }
    {------------------------ OCINumberToLnx ----------------------------------- }
    { void OCINumberToLnx(/o_ OCINumber *num _o/);  }
    { was #define dname(params) para_def_expr }
    { argument types are unknown }
//    function OCINumberToLnx(num : longint) : Plnxnum_t;

    { 
       NAME:   OCINumberToLnx
       PARAMETERS:
               num (IN) - OCINumber to convert ;
       DESCRIPTION: 
               Converts OCINumber to its internal lnx format 
               This is not to be used in Public interfaces , but
               has been provided due to special requirements from 
               SQLPLUS development group as they require to call 
               Core funtions directly . 
     }
    type
    { OCI representation of XMLType  }
      POCIXMLType = pointer;

    { OCI representation of OCIDomDocument  }
      POCIDOMDocument  = pointer;

{implementation

    function OCINumberToLnx(num : longint) : Plnxnum_t;
      begin
         OCINumberToLnx:=Plnxnum_t(num);
      end;


end.}