Is there a way to declare extern's?

Cam Woods
  • Cam Woods

    Cam Woods - 2006-07-14

    I have some script in .js files that refers to some external variables declared on the page html, some generated by .Net, some by my C# code.  Right now they're being considered undeclared variables.  I can't use jsl:import because the variables are generated dynamically so there's no design-time file to point to.

    Is there a way to do something like

    // jsl:extern xyz

    to specify that xyz is declared externally and that Lint shouldn't generate the undeclared var warning about it?


    • Matthias Miller

      Matthias Miller - 2006-07-14

      Currently you can only do that in the configuration file.

      Do you need a control comment for this? If so, to be consistent, I would suggest /*jsl:define xyz*/.

      • Cam Woods

        Cam Woods - 2006-07-16

        Yes, something like jsl:define would be good.  I was thinking jsl:extern because that's the C/C++ equivalent.

        By the way, do I have to use
        /* jsl:define xyz */
        or can I use
        // jsl:define xyz
        ?  I prefer the // notation.


        • Matthias Miller

          Matthias Miller - 2006-07-18

          This control comment is not currently supported, but if it would be, yes, it would be in the /*jsl:define abc*/ format.

          It would be possible to support //jsl:cc syntax if there's a compelling reason to do so.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks