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

  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. 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. =?ISO-8859-1?Q?Thomas_Gagn=E9?=

    Why do static and non-static method names collide?

    =?ISO-8859-1?Q?Thomas_Gagn=E9?=, Jul 2, 2003, in forum: Java
    Replies:
    12
    Views:
    6,438
    cgbusch
    Jul 5, 2003
  2. Paul Opal
    Replies:
    12
    Views:
    1,217
    Paul Opal
    Oct 11, 2004
  3. Bruce .J Sam
    Replies:
    0
    Views:
    2,185
    Bruce .J Sam
    Jun 16, 2005
  4. Markus Dehmann
    Replies:
    5
    Views:
    2,913
    red floyd
    Jul 1, 2004
  5. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    1,369
    Mark Rae
    Dec 21, 2006
  6. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,838
    Smokey Grindel
    Dec 2, 2006
  7. Allen
    Replies:
    9
    Views:
    516
    F.J.K.
    Dec 14, 2006
  8. regis
    Replies:
    3
    Views:
    2,041
    regis
    Oct 10, 2008
Loading...