BYTE数组与其它类型数据相互转换
例如将一个长整型数据变成BYTE数组,然后又如何将BYTE数组变回长整型。
Option Explicit
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Dim Sj(3) As Byte
Private Sub Command1_Click()
Dim a As Long '可定义为Single数据类型
a = Val(Text1)
CopyMemory Sj(0), a, 4
Print Sj(0), Sj(1), Sj(2), Sj(3)
End Sub
Private Sub Command2_Click()
Dim i As Integer
Dim a As Long
For i = 0 To 3
a = a Sj(i) * 256 ^ i
Next
Print a
End Sub。
问:将一个数组中的数据逆序,并输出原始数组中的数据及逆序后数组中的数据.
答:用什么语言呢?下面是C语言的 main () { inta[5]={1,2,3,4,5}; int i; printf("原始数组中的数据为:1 2 3 4 5...详情>>