有人說vb不能操作內存
在開發windows上的應用時(注意啊
最近在做界面
用vb的一般用除法這麼做
public function o
dim nValueCopy as long
dim nTmp as byte
dim sReturn as string
nValueCopy = nValue
do while nValueCopy >
nTmp = nValueCopy /
sReturn = cstr( nValueCopy
nValueCopy = nTmp
loop
o
end function
而用c比較熟的人一般按位去做
public function o
dim nBit(
dim nByte(
dim nTmp as byte
dim pValue as long
dim sReturn as string
dim i as byte
nBit(
nBit(
nBit(
nBit(
nBit(
nBit(
nBit(
nBit(
pValue = VarPtr( nValue )
CopyMemory( nByte(
for i =
for j =
nTmp =
if nByte(i) > nBit(j) then
nByte = nByte(i)
nTmp =
end if
sReturn = sReturn & cstr(nTmp)
nTmp =
if ( not ( nByte(i) imp nBit(j) ) ) = nBit(j) then
nTmp =
end if
sReturn = sReturn & cstr(nTmp)
next j
o
end function
在網吧裡
From:http://tw.wingwit.com/Article/program/ASP/201311/21655.html