Connected: An Internet Encyclopedia
13.2. Examples

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 1902
Up: 13. Appendix C: Detailed Sub-typing Rules
Prev: 13.1. Syntax Rules
Next: 13.3. Rules for Textual Conventions

13.2. Examples

13.2. Examples

Some examples of legal sub-typing:

         Integer32 (-20..100)
         Integer32 (0..100 | 300..500)
         Integer32 (300..500 | 0..100)
         Integer32 (0 | 2 | 4 | 6 | 8 | 10)
         OCTET STRING (SIZE(0..100))
         OCTET STRING (SIZE(0..100 | 300..500))
         OCTET STRING (SIZE(0 | 2 | 4 | 6 | 8 | 10))

Some examples of illegal sub-typing:

     Integer32 (150..100)         -- first greater than second
     Integer32 (0..100 | 50..500) -- ranges overlap
     Integer32 (0 | 2 | 0 )       -- value duplicated
     Integer32 (MIN..-1 | 1..MAX) -- MIN and MAX not allowed
     Integer32 ((SIZE (0..34))    -- must not use SIZE
     OCTET STRING (0..100)        -- must use SIZE
     OCTET STRING (SIZE(-10..100)) -- negative SIZE


Next: 13.3. Rules for Textual Conventions

Connected: An Internet Encyclopedia
13.2. Examples