On Mon, Apr 18, 2011 at 22:28, Canggih <[email protected]> wrote:
> hello, i just wanna share.
>
> In Protobuf developer guide, in the sample proto file, there is a
> PhoneType enum data type, consist of MOBILE, HOME, and WORK. MOBILE
> use '0' as its tag number, and so on.

This is the integer value of the enumeration value, not to be confused
with a tag number you give to identify fields.

> Meanwhile, i'm using Protobuf plugin for Netbeans, for my project.
> When i was try to compile a proto file, there was an error. The error
> was in enum data type. Compiler couldn't compile enum data that had
> '0' tag number. Then, when I change to '1', it can run successfully.

If you mean tag number, then yes, tag numbers cannot be zero but have
to start with 1. Enumeration _values_ can be 0.

-h


>
> Any explanations?
>
> Thanks in advance
> Canggih
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to