重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
#读取上次检查到的行数
创新互联公司-专业网站定制、快速模板网站建设、高性价比慈利网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式慈利网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖慈利地区。费用合理售后完善,10年实体公司更值得信赖。
last_line=`cat ./mailinfo`
echo "上次行数:"$last_line
#算出本次alert日志的行数
current_line=`wc -l $alert_log|awk '{print $1}'`
echo "本次行数:"$current_line
#取上次行数和本次行数之间的alert日志内容,然后把ORA错误及上下三行放到mailinfo中
使用API函数CopyMemory来转换。
Option Explicit
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
Private Sub Command1_Click()
Dim BB(0 To 3) As Byte
Dim se As Single
BB(0) = H0
BB(1) = H80
BB(2) = H71
BB(3) = H43
CopyMemory se, ByVal VarPtr(BB(0)), 4
Text1.Text = se
End Sub
具体参考:
Dim s As String = "你的字符串"
Dim si As Single = CType(Val(s), Single)
MsgBox(si)
程序里测试通过 你试试看。
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim aa(3) As Byte
Dim f As Single
aa(0) = H0
aa(1) = H0
aa(2) = H80
aa(3) = H3F
'CopyMemory(f, aa, 4)
f = BitConverter.ToSingle(aa, 0)
TextBox1.Text = f
End Sub
End Class