Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: JasonWB007
  • Content: Threads
  • Order by date
  1. JasonWB007

    Pointers to constants?

    Hi, Looking through some code, I found a function of the format: int function (parms..., (void *)0, parms...); Is this legal? I have a need to pass a constant to a function and I really don't want to define a variable to hold it. I have a function that will either read or write a device...
  2. JasonWB007

    What is the best external interface for a library file?

    Hi all, I am in the process of reworking some of my code so that some of the more resuable functions are collected into libraries that will be linked in with multiple applications. One of these functions is a serial port driver and the way it is set up, it requires access to several flags and...
  3. JasonWB007

    "Proper" way to declare functions

    Hi everyone, I hope this isn't too elementary for everyone, but what is the absolute strictest "proper" way to declare a C function and to access it in a separate file? Assume I have been sent to a military Catholic school for C programmers :-) (Actually, we're looking at DO-178, something...
  4. JasonWB007

    Standard format

    Hi everyone, Please forgive the simple question, but if I have a declaration, such as: const int UPPER_LIMIT = 127; is the *best* policy to have it in caps? I usually do it in: #define UPPER_LIMIT 127 and am wondering if the same thing should apply to a const variable? Thoughts? Jason
  5. JasonWB007

    #define vs. const

    Hi everyone, Sometimes, I have need for a #define that really only applies to a single subroutine, so I would like to keep it with that routine. In general, I believe that #defines go at the top of a C file, so is there a good "proper" way to place the #define within the C routine? Should I...
  6. JasonWB007

    How to access and array of strings

    Hi everyone, Sorry if this is too simple, but I am trying to figure out how to access an array of strings, using an index for the string. I have: typedef struct { PARMTYPE parmtype; _iq* parmptr; int num_indices; const char *(indices[10]); // const char *indices; } PARMTAB; and I...

Part and Inventory Search

Back
Top