从ascci到int [英] ascci to int

查看:87
本文介绍了从ascci到int的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个从串行端口接收数据的代码.这些数据是 ascci ASCII码.我想将(ASCII转换为INT)它们转换为整数.

我该怎么办?

I wrote a code which recieves data from a serial-ports. These data are ascci ASCII codes. I want to convert(ASCII to INT) them to integer.

What should I do?

推荐答案

如果从串行端口获取它们,则它们不是ASCII码(请注意正确的拼写).

串行端口传送二进制数据.如何存储它完全取决于您.您可以将其存储为一系列字符,一系列整数或任何您喜欢的东西.
If you get them from a serial port then they are not ASCII (Note correct spelling) codes.

A serial port delivers binary data. How you store it is entirely up to you. You can store it as a series of characters, a series of ints or anything else that takes your fancy.


您好,
请参阅 [
Hi
See This[^]


这篇关于从ascci到int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆