static versus non static returnvalues 
Author Message
 static versus non static returnvalues

wheres the difference between static/non static returnvalues?

           ?
           ^
__inline static unsigned long SWAP32(unsigned long a)
{

   __asm__ ("rol.w #8,%0;swap %0;rol.w #8,%0"
            :"=d"(a):"0"(a));

   return(a);

Quote:
}



Sat, 14 Feb 2004 14:44:39 GMT  
 static versus non static returnvalues

Quote:
> wheres the difference between static/non static returnvalues?
>            ?
>            ^
> __inline static unsigned long SWAP32(unsigned long a)

That's not a static returnvalue, it's a static function. It has nothing
to do with the value returned. It means that when linking, this function
should only be accessed from this translation unit.

Quote:
> {
>    __asm__ ("rol.w #8,%0;swap %0;rol.w #8,%0"
>             :"=d"(a):"0"(a));

__asm__ is off-topic for comp.lang.c.

Quote:
>    return(a);
> }

--

| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste       W++ B OP+                     |
\----------------------------------------- Finland rules! ------------/

"I will never display my bum in public again."
   - Homer Simpson



Sat, 14 Feb 2004 14:47:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Static and non-Static member - Signature

2. Creating a static class from non static Framework classes

3. Pointers to non-static vs static functions

4. One Problem in Calling Static function from Non static function

5. Static array containing non static objects and functions

6. Accessing non-static functions from a static function

7. static functions and non static variables

8. static functions with non-static variables!

9. Linking Error - Static vs. Non-Static

10. Linking Static DLL vs Non Static DLL

11. static versus auto initialization

12. static versus auto initialization

 

 
Powered by phpBB® Forum Software