why here is a static parameter used?

Discussion in 'C++' started by BruceWho, Oct 17, 2006.

  1. BruceWho

    BruceWho Guest

    I found code like
    this(http://www.yangsky.com/products/trafgo/SDK/index.htm):

    __declspec(dllexport) void tgSetBreakdownOverlapRate(static double
    rate, const int nCh)

    the parameter rate is defined as static? I have never seen a parameter
    declared as static. Could anybody tell me why static is used here?
    BruceWho, Oct 17, 2006
    #1
    1. Advertising

  2. BruceWho

    Ron Natalie Guest

    BruceWho wrote:
    > I found code like
    > this(http://www.yangsky.com/products/trafgo/SDK/index.htm):
    >
    > __declspec(dllexport) void tgSetBreakdownOverlapRate(static double
    > rate, const int nCh)
    >
    > the parameter rate is defined as static? I have never seen a parameter
    > declared as static. Could anybody tell me why static is used here?
    >

    I have no idea. It's not valid C++ and in four major versions of
    Visual Studio I've never encountered it as an extension. VS2005
    certainly gives an diagnostic for the parameter having a "bad storage
    class.
    Ron Natalie, Oct 17, 2006
    #2
    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. Paul Opal
    Replies:
    12
    Views:
    940
    Paul Opal
    Oct 11, 2004
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    877
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,805
    Smokey Grindel
    Dec 2, 2006
  4. Allen
    Replies:
    9
    Views:
    396
    F.J.K.
    Dec 14, 2006
  5. regis
    Replies:
    3
    Views:
    1,487
    regis
    Oct 10, 2008
Loading...

Share This Page