"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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    400
    Daniel Klein
    Sep 7, 2003
  2. metaperl
    Replies:
    32
    Views:
    1,227
    NickC
    Sep 15, 2006
  3. Delaney, Timothy (Tim)
    Replies:
    10
    Views:
    860
    Jason
    Sep 14, 2006
  4. Replies:
    1
    Views:
    554
    John Timney \(MVP\)
    Jan 19, 2007
  5. Roman Werpachowski

    Is 'close' a reserved word in C++ ?

    Roman Werpachowski, Dec 29, 2005, in forum: C++
    Replies:
    11
    Views:
    703
    Niklas Norrthon
    Dec 29, 2005
  6. BBands

    with as a reserved word

    BBands, Jun 11, 2007, in forum: Python
    Replies:
    6
    Views:
    1,016
    BBands
    Jun 11, 2007
  7. globalrev
    Replies:
    8
    Views:
    402
    Terry Reedy
    May 5, 2008
  8. Replies:
    3
    Views:
    359
    osmium
    Nov 6, 2013
Loading...