“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.
更多推荐
发布评论