文件名称:Float-Process
介绍说明--下载内容来自于网络,使用问题请自行百度
VB串口通信中经常会遇到10进制浮点数转为多字节Byte数据类型的情况,以及在接收后需转为10进制浮点数需求。
VB有专门的API函数CopyMemory能处理2-10进制浮点数转换和10-2进制浮点数转换。
下列代码演示了10进制Single(单精度浮点型转为16进制字符显示的浮点数和其相反运算:
-VB serial communication often encounter decimal floating-point to multi-byte Byte data type, as well as after reception needs to be converted to decimal floating-point number. VB has a special API function CopyMemory can handle binary floating-point conversion and 10-2 2-10 hex floating-point conversion. The following code demonstrates decimal Single (single-precision floating-point into a hexadecimal character display of floating point operations and its opposite:
VB有专门的API函数CopyMemory能处理2-10进制浮点数转换和10-2进制浮点数转换。
下列代码演示了10进制Single(单精度浮点型转为16进制字符显示的浮点数和其相反运算:
-VB serial communication often encounter decimal floating-point to multi-byte Byte data type, as well as after reception needs to be converted to decimal floating-point number. VB has a special API function CopyMemory can handle binary floating-point conversion and 10-2 2-10 hex floating-point conversion. The following code demonstrates decimal Single (single-precision floating-point into a hexadecimal character display of floating point operations and its opposite:
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Float Process.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.