Convert Harbour numeric into unsigned short encoded bytes


W2Bin( <nNumber> ) --> cBuffer


<nNumber> is a numeric value to convert (decimal digits are ignored).


W2Bin() return two bytes character string that contain 16 bit encoded unsigned short integer (least significant byte first).


     W2Bin() is one of the low level binary conversion functions, those functions convert between Harbour        numeric and a character representation of numeric value. W2Bin() take a numeric integer value and            convert it into two bytes of encoded 16 bit unsigned short integer.

 You might ask what is the need for such functions, well, first of all it allow you to read/write information from/to a binary file (like extracting information from DBF header), it is also a useful way to share information from source other than Harbour (C for instance).

          W2Bin() is the opposite of Bin2W()




Library is core


Bin2I(), Bin2L(), Bin2U(), Bin2W(), I2Bin(), L2Bin(), Word(), U2Bin(), FWrite()


3 responses to “W2Bin()

  1. Pingback: Harbour All Functions – W | Viva Clipper !

  2. Pingback: Harbour Conversion Functions | Viva Clipper !

  3. Pingback: Harbour RG Summary | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s