Re: unable to make an global array inside a class

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Geir Klemetsen (regeirgarbagespam_at_start.no)
Date: 10/24/04

  • Next message: Michael Harris \(MVP\): "Re: unable to make an global array inside a class"
    Date: Sun, 24 Oct 2004 23:47:43 +0200
    
    

    "Michael Harris (MVP)" <mikhar at mvps dot org> skrev i melding
    news:#QFIEGktEHA.904@TK2MSFTNGP11.phx.gbl...
    > Geir Klemetsen wrote:
    > > Hi. I just got an stupid problem:
    > >
    > > I want to have an class with an array which scope is global in that
    > > class.
    >
    >
    > Your problem does not repro on current (5.6) versions of VBScript.
    >
    > This was a known limitation in the intialize VBScripr version that
    supported
    > classes. The solution is to upgrade VBScript to current release levels
    via
    > an IE6 upgrade or a WSH 5.6 standalone install.

    It's done.

    Now I can define a global array inside a class.
    But, still I can't create a global constant inside a class. Why ?

    ' This won't work (even with version 5.6)
    ' Test Code starts here
    Class test
      Private Const constantValue = "containing text" ' Suntax Error in this
    line
    End Class
    ' And stops here.


  • Next message: Michael Harris \(MVP\): "Re: unable to make an global array inside a class"

    Relevant Pages

    • Re: Is it possible to use the value of the PROGRAM ID within the source code?
      ... Until the universal availability of scope terminators there were ... But 'reusability' is not a unique feature of OO design. ... remain and some are now garbage. ... A tree can be made faster by increasing its width; an array ...
      (comp.lang.cobol)
    • Re: Packages and returning errors
      ... > array intact. ... sub is_a_instance_method { ... my $class = shift; ... You need to fix the scope of $error by moving its declaration outside ...
      (comp.lang.perl.misc)
    • Re: VBscript Array Split Function
      ... inputted into an array so that each separate character in the array is ... make sense and can't be handled properly by VBScript. ... Dim strValue, strChar, k, arrChars() ...
      (microsoft.public.scripting.vbscript)
    • Re: problems with binary types in an ADO recordset
      ... I'm having problems extracting values from binary types in VBscript. ... You can't directly address individual array elements, ... Dim strTemp ... ' Convert Byte-Array to VBScript ANSI string. ...
      (microsoft.public.scripting.vbscript)
    • Re: Postscript questions
      ... It looks as if you believe the curly braces are defining a scope. ... Curly braces are behaving much more like the square brackets, the array "delimiters". ... The difference is deferred execution, ... Evaluating an executable name means that the interpreter searchs the name through the dictionnary stack and when found, evaluate the value associated with the name. ...
      (comp.lang.postscript)