Slide 32 of 41
Notes:
The first case is easy: if the module header says “EXPLICIT TAGS”, then absence of a keyword means just that - explicit tagging (which as stated earlier is legal everywhere).
If the module header says “IMPLICIT TAGS”, however, then absence of a keyword means implicit tagging only where that is legal, and explicit tagging otherwise (on untagged CHOICE types).
If the module header says nothing, you might expect the default to be implicit, as that is what most people want most of the time. Or perhaps you might expect absence of a keyword then to be illegal. In fact, it is none of these - absence of a module header and absence of a keyword means explicit tagging. This is largely due to the fact that only explicit tagging is everywhere legal, and that in the first version of ASN.1 (X.409) there were no module headers, and only the IMPLICIT keyword existed.
Finally, I must mention again “AUTOMATIC TAGS” in the module header. This effectively means a textual transformation of the module to insert tags “[0]”, “[1]”, “[2]”, etc to every choice, sequence and set. The automatic tagging is implicit if legal, otherwise explicit. There is, however, one further complication (or useful feature - take your pick!) - if any given choice (or sequence or set) already textually contains at least one tag (at the outermost level of that syntactic construct) then the automatic tagging is switched off for that construct, and the user is responsible for ensuring that rules about needing distinct tags are obeyed. If AUTOMATIC TAGS is in the header, but is switched off because of one or more textually present tags, the tagging for those tags is as if the module header said “IMPLICIT TAGS”.