Wh'sup? with "END lable"? Best Practice? Ever Required?

Is an "END label" ever required? Generally, what's up with the "End label"?-- in 5th Ed "Oracle PL./SQL Programming" you have it replete in your early examples. Then you specifically discuss and recommend for Functions and Procedures (500 pages later!). You mention it for Packages. It is shown (and not) for a Labeled Block <>. And on pg57 you use one for an anonymous and unlabeled block! Can you just add an "END label" as a comment? -- that is, is nothing between the "END" keyword and the semicolon evaluated by the compiler? If so, shouldn't that be a third commenting method -- or does it matter syntactically? Funny you explain something as esoteric as "wrap" but you leave these seemingly meaningful strings, outside of comments, unexplained as we try to follow your examples. Perhaps something to consider for 6th Edition :-)
1 person has
this question
+1
Reply
  • Hi Brad,
    Thanks for contacting us about this.
    I'm not sure what exactly the author intended with the 'END label" thing, but I will forward your question on to them for some clarification for you.

    Cheers,
    Tai H.
    Customer Service Rep,
    O'Reilly Media
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated happy, confident, thankful, excited

  • Brad,

    I will take a look at how we might improve support for coverage of end labels in the sixth edition, but I can tell you this:

    * The END label is never required.
    * It is certainly helpful for self-documentation of code, though I don't think it should be classified as a kind of comment.
    * It also serves a functional role if you use that same label in an actual label <> in front of a block or loop.
    * I do not leave these unexplained. They are explained in context: for example, three entries in the index, pages 116-117, etc.

    So I explain how to use end labels for the different "types" of end statements, when I discuss those statements.

    As for inconsistency of use in the book, well, I have no defense for that except that it is 1000 pages long with lots and lots of code. :-)

    Hope that helps.

    Cheers, SF
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned kidding, amused, unsure, silly sad, anxious, confused, frustrated happy, confident, thankful, excited