` Printed Icetips Article

Icetips Article



Windows API: Is there a "binary representation" command
2003-05-30 -- Jeff Slarve
 
Newsgroups: softvelocity.products.c55ee


 Program

 MAP
   MODULE('clib')
        LtoA(LONG num ,*CSTRING s, |
        SIGNED radix),ULONG,RAW,NAME('_ltoa'),PROC
    END
 end

BinString CString(33)
HexString CString(9)

  Code

  LtoA(5416,BinaryString,2)
  LtoA(5416,HexString,16)
  Message('Binary: ' & BinaryString & '|Hex:' & HexString)


On Fri, 30 May 2003 11:51:28 -0400, "Michael Frazer"
 wrote:

>Hi,
>
>I need to get the binary representation of a number.  For example, 9 would
>be 1,001, and 5,416 would be 1,010,100,101,000.   Any ideas.
>
>Michael Frazer
>mjf@FrazerComputing.com
>
>


Jeff Slarve
http://www.jssoftware.com



Printed November 21, 2024, 7:27 am
This article has been viewed/printed 35205 times.
Google search has resulted in 10 hits on this article since January 25, 2004.