hello csdn
来源:互联网 发布:ubuntu压缩文件夹 编辑:程序博客网 时间:2024/05/06 23:51
测试csdn的文章发送流程
这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,这里是正文,
qq截图, 剪贴板 直接复制的图片....
这段文字快捷键ctrl+B 黑体OK
上面试试发送代码 格式化显示..ctrl+e是表情的快捷方式
qq截图, 剪贴板 直接复制的图片....
这段文字快捷键ctrl+B 黑体OK
'version5.11'操作对象里面含有数组的都属于数据操作Option Explicit''-----------------------DEMO_CODE---------------------------------' Dim Str_send As String: Str_send = "1010101" '"发送 fa 01 12 3 4 3 1 22332211221122 哦哦 还有这个. fa 33"' Dim ArBYTE_send() As Byte: ArBYTE_send = Str_send '转数组' Dim ArV_sendHEX As Variant: ArV_sendHEX = converHEX(ArBYTE_send) '关键点 转hex'-------------------------代码开始---------------------------------Function converSTRHEX(Str_send As String) As Variant 'CSBmk <str pre process> 'Str_send = "1010101" '"发送 fa 01 12 3 4 3 1 22332211221122 哦哦 还有这个. fa 33" Dim incoming() As Byte: incoming = Str_send '转数组 'CSBmk <准备一些临时数组相关的东西> Dim arr_temp() As Byte Dim arr_temp_lenth As Long Dim arr_temp_8bit As Byte Dim arr_temp_bit_HiLo As Byte '0:低四位 1:高四位 'CSBmk <查询数组里面的每一个字符> Dim I As Long For I = 0 To UBound(incoming) 'CSBmk <如果字符是0...9 a..F的话就继续> 'CSBmk < 第一个字符认作低四位> If ((incoming(I) >= Asc("0") And incoming(I) <= Asc("9")) Or (incoming(I) >= Asc("a") And incoming(I) <= Asc("f")) Or (incoming(I) >= Asc("A") And incoming(I) <= Asc("F"))) And arr_temp_bit_HiLo = 0 Then arr_temp_8bit = Val("&H" & Chr(incoming(I))) arr_temp_bit_HiLo = 1 'CSBmk < 如果有另一个字符,那么原低四位左移变成高四位.结合这个低四位.下一个> ElseIf ((incoming(I) >= Asc("0") And incoming(I) <= Asc("9")) Or (incoming(I) >= Asc("a") And incoming(I) <= Asc("f")) Or (incoming(I) >= Asc("A") And incoming(I) <= Asc("F"))) And arr_temp_bit_HiLo = 1 Then arr_temp_8bit = arr_temp_8bit * 16 + Val("&H" & Chr(incoming(I))) arr_temp_bit_HiLo = 0 ReDim Preserve arr_temp(arr_temp_lenth) arr_temp(arr_temp_lenth) = arr_temp_8bit '高地8bit组成一字节,填入临时数组内 arr_temp_lenth = arr_temp_lenth + 1 '临时数组加1 arr_temp_8bit = 0 '高地8bit , 清零 arr_temp_bit_HiLo = 0 '下一个读的.变成第八位 'CSBmk < 遇到空格了.就直接下一个> ElseIf incoming(I) = Asc(" ") And arr_temp_bit_HiLo = 1 Then ReDim Preserve arr_temp(arr_temp_lenth) arr_temp(arr_temp_lenth) = arr_temp_8bit '高地8bit组成一字节,填入临时数组内 arr_temp_lenth = arr_temp_lenth + 1 '临时数组加1 arr_temp_8bit = 0 '高地8bit , 清零 arr_temp_bit_HiLo = 0 '下一个读的.变成第八位 'CSBmk < 结束了整个字串,那么最后一个就认作是独立的一位> ElseIf I = UBound(incoming) And arr_temp_bit_HiLo = 1 Then ReDim Preserve arr_temp(arr_temp_lenth) arr_temp(arr_temp_lenth) = arr_temp_8bit '高地8bit组成一字节,填入临时数组内 arr_temp_lenth = arr_temp_lenth + 1 '临时数组加1 arr_temp_8bit = 0 '高地8bit , 清零 arr_temp_bit_HiLo = 0 '下一个读的.变成第八位 'ElseIf 双字节检测的定时清零失效的话,就抛弃,例如汉字这种情况' End If Next ' ReDim converHEX(UBound(arr_temp)) ' Dim elementxx As Variant ' For Each elementxx In arr_temp ' converHEX(1) = elementxx ' Next elementx converSTRHEX = arr_tempEnd Function'-------------------------代码结束---------------------------------
上面试试发送代码 格式化显示..ctrl+e是表情的快捷方式
- Hello CSDN!
- hello csdn
- HELLO CSDN!
- hello,csdn
- Hello CSDN
- Hello CSDN
- Hello CSDN !! ;)
- hello!csdn!
- Hello ,CSDN
- Hello,CSDN.
- Hello, CSDN!
- Hello CSDN
- Hello CSDN
- hello CSDN
- hello, csdn
- Hello CSDN
- Hello CSDN
- hello csdn
- Google Code Jam Great China Test Round 2013
- 阿里巴巴2013年测试开发笔试题目重点解读
- 百练 2700 字符替换
- Linux下修改Informix数据库字符集为UTF-8
- Spark源代码编译生成错误解决方案
- hello csdn
- 26+富有创意且响应式的Drupal 7主题
- IOS系列——自定义外部方法供其他类里面的对象调用
- oracle sql优化
- 用T--SQL 输出99乘法表:
- Android 异步
- 谷歌的30条建议让你的Web Site达到高性能 --- 缓存篇
- hdu 1237 简单计算器
- STL容器选择