Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 18th December 2006, 15:17
manojsharma's Avatar
manojsharma manojsharma is offline
Senior Member
 
Join Date: Sep 2002
Location: Delhi
Posts: 200
manojsharma is on a distinguished road
Baan: 4C4, 5, Baan LN - DB: Oracle,informix - OS: Unix, NT, Windows-2000
Hexadecimal to Binary
Baan: Other/Unknown
C/S: None/Unknown

Hi all,

How can I convert hexadecimal code to binary in baan-IV.

Thankx in advance.
__________________
Together we can and we will make a difference
Reply With Quote
  #2  
Old 18th December 2006, 15:41
george7a's Avatar
george7a george7a is offline
Guru
 
Join Date: May 2004
Location: Nazareth
Posts: 1,490
george7a is on a distinguished road
Baan: IVc, 5.0 b, 5.0 c, LN 6.1 - DB: MS SQL, Oracle - OS: Windows 2000, 2003 & UNIX
Hi,

Every digit in Hexa converts to four binary digits

Hex ==> Bin
0 ==> 0000
1 ==> 0001
2 ==> 0010
...
..
F ==> 1111

Example:
F2 ==> 11110010

Code:
function string Hex.to.Bin(string in.hex(32))
{
   | Written By: George Abdo
   long i
   string tmp.bin(4),out.bin(128)
   

   for i=1 to len(in.hex)
      
      on case in.hex(i;1)
      
         case "0": tmp.bin = "0000"
            break
         case "1": tmp.bin = "0001"
            break
         case "2": tmp.bin = "0010"
            break
         case "3": tmp.bin = "0011"
            break
         case "4": tmp.bin = "0100"
            break
         case "5": tmp.bin = "0101"
            break
         case "6": tmp.bin = "0110"
            break
         case "7": tmp.bin = "0111"
            break
         case "8": tmp.bin = "1000"
            break
         case "9": tmp.bin = "1001"
            break
         case "A": tmp.bin = "1010"
            break
         case "B": tmp.bin = "1011"
            break
         case "C": tmp.bin = "1100"
            break
         case "D": tmp.bin = "1101"
            break
         case "E": tmp.bin = "1110"
            break
         case "F": tmp.bin = "1111"
            break
         default:
            return ("Error")
              
      endcase

      out.bin=out.bin&tmp.bin
      
   endfor
   
   return(out.bin)

}
I hope it helps,

- George
__________________
_
George Abdo
NAZDAQ - Your Documents, Your Way.
Reply With Quote
  #3  
Old 18th December 2006, 16:04
manojsharma's Avatar
manojsharma manojsharma is offline
Senior Member
 
Join Date: Sep 2002
Location: Delhi
Posts: 200
manojsharma is on a distinguished road
Baan: 4C4, 5, Baan LN - DB: Oracle,informix - OS: Unix, NT, Windows-2000
thnks

Hi George,

Thanks for your reply. I will check and revert to you
__________________
Together we can and we will make a difference
Reply With Quote
Sponsored Links
  #4  
Old 20th December 2006, 20:51
manojsharma's Avatar
manojsharma manojsharma is offline
Senior Member
 
Join Date: Sep 2002
Location: Delhi
Posts: 200
manojsharma is on a distinguished road
Baan: 4C4, 5, Baan LN - DB: Oracle,informix - OS: Unix, NT, Windows-2000
Thanks a lot

Hi George,

My problem solved. Thanks a lot.
__________________
Together we can and we will make a difference
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary "Text" field in Crystal 7 batmush Third Party Products 6 15th June 2007 13:44
Here's the code for accessing the passage binary dave_23 Code & Utilities 36 7th March 2007 14:04
how to convert binary field to vbscript ncgjiju Tools Development 2 3rd June 2005 07:05
binary data itconsultant Tools Development 3 3rd February 2004 14:40
VB, ODBC and Binary fields on SQL server halvorn Tools Development 6 8th September 2003 06:34


All times are GMT +2. The time now is 15:48.


©2001-2017 - Baanboard.com - Baanforums.com