local "static" variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Zeljko

    #1

    local "static" variable

    Hi,

    Is there a way to define a local variable that retains it's value
    between the function calls ?

    Zeljko
  • Mattias Sjögren

    #2
    Re: local "static&qu ot; variable

    [color=blue]
    >Is there a way to define a local variable that retains it's value
    >between the function calls ?[/color]

    No, make it a field variable instead.



    Mattias

    --
    Mattias Sjögren [MVP] mattias @ mvps.org

    Please reply only to the newsgroup.

    Comment

    • Cybertof

      #3
      Re: local "static&qu ot; variable

      Field = variable at class level.

      And make it a public property to access it in a clean way.


      In article <OQtiZBRqDHA.23 12@TK2MSFTNGP12 .phx.gbl>,
      mattias.dont.wa nt.spam@mvps.or g says...[color=blue]
      >[color=green]
      > >Is there a way to define a local variable that retains it's value
      > >between the function calls ?[/color]
      >
      > No, make it a field variable instead.
      >
      >
      >
      > Mattias
      >
      >[/color]

      Comment

      • Zeljko

        #4
        Re: local &quot;static&qu ot; variable

        Hm.. OK, I thought there might be something simlar to VB6 static
        keyword.

        On Wed, 12 Nov 2003 12:28:33 +0100, Mattias Sjögren
        <mattias.dont.w ant.spam@mvps.o rg> wrote:
        [color=blue]
        >[color=green]
        >>Is there a way to define a local variable that retains it's value
        >>between the function calls ?[/color]
        >
        >No, make it a field variable instead.
        >
        >
        >
        >Mattias[/color]

        Comment

        Working...