I saw a header (.h) file with mixture of "regular" function declarations and other extern function declarations. As I was told all function declarations are implicitly external and the extern on functions declarations is superfluous. Here my focus is on function declaration, not variable yet.
Code:
int fq_read_length (char *data);
char *fa_count (char *start, int length);
extern int get_parainfo (char *full, Queue *head, char type);
extern char *fastq_relocate (char *data, int offset, int length);
extern char *jump (char *target, char type, float sampling_rate);
extern char *get_right_sp (char *start_point ,char type);
extern char *check_fmt (Queue *info, Queue *tail, char *start_point, char type);
int total_full_check (bloom * bl, char *p, int length, float tole_rate, F_set *File_head);
extern int fastq_read_check (char *begin, int length, char mode, bloom * bl, float tole_rate, F_set *File_head);
extern int fasta_read_check (char *begin, int length, char mode, bloom * bl, float tole_rate, F_set *File_head);
void isodate(char* buf);
int total_subscan (bloom *bl, F_set *File_head, char *begin, char *start_point, int read_length, int true_length, float tole_rate, char mode, char type);
Then why is extern on function declaration still used, and what is the benefit? Thanks!
Hi,
Please let me know if the extern keyword is necessary for using functions which is defined and declared in another file and and used in a different file where both these files are linked together.
thanks (8 Replies)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
Hi there, I'm having a bit of a strange problem which I would appreciate some help with.
The Problem:
I have two external hard drives, but I'm borrowing one off my parents to copy data too (one of mine, which is identical to theirs - WD MyBook 300g - is on its way out).
Fedora 9 recognizes... (3 Replies)
Hi,
I'm searching for an solution for the following problem.
I want fetch some mails via pop3 from a@a.com with fetchmail.
That works perfectly. Now any incoming mail should forwarded to b@b.com via smtp obv. But I don't know how to configure that. All online tutorials describe forwarding to... (0 Replies)
Why this is happening when both of them compiled together and run?
I am getting segmentation fault SIGSEGV.
File1.c:
int arr;
File2.c:
extern int *arr;
int main() {
arr = 100;
} (3 Replies)
In the header file data.h i got:
const char ack_msg = "ack: received your msg\n";
In the code file server.c i got:
extern const char ack_msg;
And else it is only used in a function call:
user$ grep ack_msg *c *h
server.c:extern const char ack_msg;
server.c: n = write(clientsfd,... (5 Replies)
Dear All.
I have a script, which process files one by one. In the script I have two functions.
one sftp files to different server
the other from existing file create file with different name.
My question is:
Will sftp function recognize files names , which are created in another... (1 Reply)
Hi All,
Good Day, seeking for your assistance on how to not perform my 2nd, 3rd,4th etc.. function if my 1st function is in else condition.
#Body
function1()
{
if
then
echo "exist"
else
echo "not exist"
}
#if not exist in function1 my all other function will not proceed.... (4 Replies)
Discussion started by: meister29
4 Replies
LEARN ABOUT HPUX
fegetenv
fegetenv(3M)fegetenv(3M)NAME
fegetenv() - get floating-point environment
SYNOPSIS
HP Integrity Server Only
PA-RISC Only
DESCRIPTION
The function stores the current floating-point environment in the object pointed to by the argument envp.
To use this function, compile either with the default option or with the and options.
Make sure your program includes
For Integrity servers, specify on the compiler command line or place the call to this function under the effect of an affirmative pragma:
If the pragma is placed outside of any top-level declarations in a file, the pragma will apply to all declarations in the compilation fol-
lowing the pragma until another pragma is encountered or until the end of the file is reached.
If the pragma is placed at the beginning of a block (compound statement), the pragma will apply until another pragma is encountered or
until the end of the block is reached.
For PA-RISC, you might need to use the +Onomoveflops compiler option in order to prevent optimizations that can undermine the specified
behavior of this function.
Link in the math library by specifying on the compiler or linker command line.
For more information, see the at the following site:
RETURN VALUE
Integrity Server Only
This function always returns 0, indicating that a representation of the current environment was successfully stored.
PA-RISC Only
None.
ERRORS
No errors are defined.
EXAMPLES
Store the current floating-point environment:
SEE ALSO feholdexcept(3M), fesetenv(3M), feupdateenv(3M), fenv(5).
STANDARDS CONFORMANCE
: ISO/IEC C99 (including Annex F, "IEC 60559 floating-point arithmetic")
fegetenv(3M)