“by bytes”vs“in bytes”[关闭](“by the bytes” vs “in bytes” [closed])

编程入门 行业动态 更新时间:2024-10-27 22:23:48
“by bytes”vs“in bytes”[关闭](“by the bytes” vs “in bytes” [closed]) template<class CharType> struct StringWithLength { size_t length; CharType* str_buf; };

我想在字段长度上添加一些注释。 我有两个选择:

#1. "The field length is the size of str_buf by the byte" (Consider "The worker is paid by the hour") #2. "The field length is the size of str_buf in bytes"

从英语母语人士的角度来看哪个更自然?

谢谢。

template<class CharType> struct StringWithLength { size_t length; CharType* str_buf; };

I want to add some comments on the field length. I have two choices:

#1. "The field length is the size of str_buf by the byte" (Consider "The worker is paid by the hour") #2. "The field length is the size of str_buf in bytes"

Which is more natural from the viewpoint of a native English speaker?

Thanks.

最满意答案

我也不会用。 我会说:

length字段的值是缓冲区的大小,以字节为单位。

字段本身不是“以字节表示”,而是计算机中的所有数据。 它是缓冲区大小(或文本大小,或其他),以字节为单位。

I wouldn't use either. I'd say something like:

The value of the length field is the size of the buffer, in bytes.

The field itself isn't "represented in bytes" any more than all data in a computer is. It's the buffer size (or text size, or whatever) which is in bytes.

更多推荐

本文发布于:2023-08-04 12:49:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1416486.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:bytes   closed

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!