version gcc 2.95.3
SunOS 5.6
Hi,
why can I not put a printf() at the beginning of a function ?
I do not remember this being a problem, but at the moment I find this does not work
Code:
void function(int parameter)
{
printf("test");
int variable;
variable = 1;
printf("value in variable is %d\n", variable);
}
whereas this works
Code:
void function(int parameter)
{
int variable;
variable = 1;
printf("test");
printf("value in variable is %d\n", variable);
}
it appears as though an assigment has to be made before it is allowed, is this true ?
example of error from a make:-
gcc -c telex_filter.c -I../lib -I../common
telex_filter.c: In function `telex_filter_process':
telex_filter.c:86: parse error before `extern'
make: *** [telex_filter.o] Error 1
my reason for this, is to check what is coming into the function, i.e., what values are being passed in,
tia,