"enum" is a reserved word in JScript

Discussion in 'Javascript' started by VK, Nov 28, 2005.

  1. VK

    VK Guest

    Just to realease my frustration:

    innocent "enum" is a reserved word in JScript!

    !@#$%^&*

    I occasionally discovered it just before I got ready to smash my
    computer over my head (some people would enjoy I guess ;-)

    Maybe someone has her/his collection of "undocumented reserved words"
    for JavaScript / JScript? Thus some identifiers which are not
    officially prohibited but may lead to some bizzare results in some
    bizzare (or not really) circumstances ?
     
    VK, Nov 28, 2005
    #1
    1. Advertising

  2. On 28/11/2005 18:08, VK wrote:

    > Just to realease my frustration:
    >
    > innocent "enum" is a reserved word in JScript!


    That doesn't really come as a surprise. It's a future reserved word in
    ECMAScript, too.

    Perhaps your might want to refresh your memory of sections 7.5.2 and
    7.5.3, as well as
    <http://msdn.microsoft.com/library/en-us/script56/html/js56jsconreserved.asp>.
    Alternatively, use a syntax highlighting editor that automatically marks
    all of these.

    [snip]

    > Maybe someone has her/his collection of "undocumented reserved words"
    > for JavaScript / JScript?


    Other than properties that are clearly part of browser object models
    (like document, etc.), what undocumented reserved words have you ever
    come across? I don't recall any at the moment.

    [snip]

    Mike

    --
    Michael Winter
    Prefix subject with [News] before replying by e-mail.
     
    Michael Winter, Nov 28, 2005
    #2
    1. Advertising

  3. VK

    VK Guest

    Michael Winter wrote:
    > Perhaps your might want to refresh your memory of sections 7.5.2 and
    > 7.5.3, as well as
    > <http://msdn.microsoft.com/library/en-us/script56/html/js56jsconreserved.asp>.


    I be damned! I overlooked this little sucker in the list.

    :-(

    I guess I have to follow the advice I gave several times to others:
    print this stuff out and keep right in front of myself.
     
    VK, Nov 28, 2005
    #3
  4. VK wrote:
    > Just to realease my frustration:
    >
    > innocent "enum" is a reserved word in JScript!
    >
    > !@#$%^&*
    >
    > I occasionally discovered it just before I got ready to smash my
    > computer over my head (some people would enjoy I guess ;-)


    JSLint checks for stuff like this.

    http://www.JSLint.com
     
    Douglas Crockford, Nov 29, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Klein
    Replies:
    4
    Views:
    342
    Daniel Klein
    Sep 7, 2003
  2. metaperl
    Replies:
    32
    Views:
    922
    NickC
    Sep 15, 2006
  3. Delaney, Timothy (Tim)
    Replies:
    10
    Views:
    671
    Jason
    Sep 14, 2006
  4. Steve Holden
    Replies:
    0
    Views:
    396
    Steve Holden
    Sep 13, 2006
  5. Replies:
    3
    Views:
    169
    osmium
    Nov 6, 2013
Loading...

Share This Page