How to convert number to ASCII [message #465887] |
Thu, 15 July 2010 22:18 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gacon1982
Messages: 7 Registered: July 2010
|
Junior Member |
|
|
Hi every body
I have a problem .
In file RFT . I create a number automatic increase .
<?xdoxslt:set_variable($_XDOCTX,'NUM',0)?>
<?xdoxslt:set_variable($_XDOCTX,'NUM',xdoxslt:get_variable($_XDOCTX,'NUM')+1)?>
<?xdoxslt:get_variable($_XDOCTX,'NUM')?>
I will have NUM = 1 , 2 , 3 ,4 ..vv.vv
But I want NUM = A , B , C , D ...v.vv or I , II , III , IV
Help me ...
Thanks
|
|
|
|
|
Re: How to convert number to ASCII [message #465970 is a reply to message #465958] |
Fri, 16 July 2010 03:09 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
"etc.", I guess.
gacon1982, we have a problem: as long as it is relatively simple to match numbers 1, 2, 3 with letters A, B, C, what would you want to do once numbers (and their letter pairs) reach the last letter (Z)? What comes next?
Roman numbers (I, II, III, IV, ... MCMLXVIII) are, whoa, another story. There's no 1:1 relationship, so you'd probably have to work a little bit harder in order to make it work.
|
|
|
|
|
Re: How to convert number to ASCII [message #465982 is a reply to message #465979] |
Fri, 16 July 2010 04:03 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
gacon1982
Messages: 7 Registered: July 2010
|
Junior Member |
|
|
Thanks Littlefoot .
But I can not call function from BI , because I have numbers automatically increase from BI .
<?xdoxslt:set_variable($_XDOCTX,'NUM',0)?>
<?xdoxslt:set_variable($_XDOCTX,'NUM',xdoxslt:get_variable($_XDOCTX,'NUM')+1)?>
<?xdoxslt:get_variable($_XDOCTX,'NUM')?>
and I must convert the number ('NUM' as 1,2,3..) to character A , B , C ...
Help me please ..
|
|
|
|
|
|
|
|
|
|
Re: How to convert number to ASCII [message #471123 is a reply to message #466100] |
Thu, 12 August 2010 07:33 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/45399.jpg) |
vamsi kasina
Messages: 2112 Registered: October 2003 Location: Cincinnati, OH
|
Senior Member |
|
|
I too didn't get before.
After I install latest version, I could see A, B, C for 1, 2, 3.
What is your version?
But I've used position. Anyway you've initialized to zero and increasing by 1.
If you are doing that by row by row, you can use
<?xdofx:chr(64 + position())?>
Some how if we use xdoxslt and xdofx, it is erring out.
By
Vamsi
|
|
|