On Tue, Jul 03, 2001 at 12:13:47AM +0300, Shaul Karl wrote:
Thank you for the responses.
What I have done wrong is already pointed out.
If you are curious what I am trying to do:
1. I wanted to have jmp_buf* passed as a function parameter in order to avoid
a global variable. Therefore, in
Nadav Har'El wrote:
On Tue, Jul 03, 2001, Shaul Karl wrote about Re: (main_buf =
*main_buf_p) is not syntacticly like (i = *j) ?:
Thank you for the responses.
You're welcome. I bet you didn't expect so many correct responses. Well,
I take the credit for the first response (my response
Adi Stav wrote:
On Tue, Jul 03, 2001 at 12:13:47AM +0300, Shaul Karl wrote:
Thank you for the responses.
What I have done wrong is already pointed out.
If you are curious what I am trying to do:
1. I wanted to have jmp_buf* passed as a function parameter in order to avoid
a global variable.
On Tue, Jul 03, 2001 at 03:10:05PM +0200, Shachar Shemesh wrote:
short C++ code:
void A()
{
try
{
class someclass var1(constructor_arguments);
B();
some_more_activities();
} catch( ... )
{
some_exception_code();
}
}
void B()
Isn't is amazing that the same people that jump to
your throat when they think that something off-topic
is posted, are the same people who will galdly join an
off-topic religious war on the list ?
Please, stop this Thread,
--ury
I have two 11 lines C programs which are supposed to be syntacticly similar.
Yet int_test.c get compiled while the other does not:
Script started on Mon Jul 2 14:51:10 2001
[14:51:10 tmp]$ more *_test.c
::
int_test.c
::
#include setjmp.h
int main()
{
int i;
On Mon, Jul 02, 2001, Shaul Karl wrote about (main_buf = *main_buf_p) is not
syntacticly like (i = *j) ?:
#include setjmp.h
int main()
{
jmp_buf test_env;
jmp_buf *test_env_p = test_env;
test_env = *test_env_p;
return 0;
}
jmp_test.c:9: incompatible types
Tthe type jmp_buf is a typedef of an ARRAY.
As such, an array cannot be directly assigned to, only its elements.
This code produces the same error as the second program:
(Note the substitution of 'int' for 'int[1]' via typedef)
typedef int foo[1];
int main()
{
foo i;
foo *j = i;
i =
Nadav Har'El wrote:
Which means the jmp_buf type is an array. In C you can't normally assign
arrays like you did (because C thinks you're trying to assign pointers, rather
than the content of the array), so either do
Slight correction. I know I lost a bet over this, and I know many people
Shaul Karl wrote (and you can't deny):
[snip code]
What did I miss?
The topic. Try comp.lang.c
=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo
On Mon, Jul 02, 2001, Shachar Shemesh wrote about Re: (main_buf = *main_buf_p) is not
syntacticly like (i = *j) ?:
Nadav Har'El wrote:
Which means the jmp_buf type is an array. In C you can't normally assign
arrays like you did (because C thinks you're trying to assign pointers, rather
On Mon, Jul 02, 2001 at 03:00:21PM +0300, Shaul Karl wrote:
I have two 11 lines C programs which are supposed to be syntacticly similar.
Yet int_test.c get compiled while the other does not:
Script started on Mon Jul 2 14:51:10 2001
[14:51:10 tmp]$ more *_test.c
::
Shaul Karl [EMAIL PROTECTED] writes:
#include setjmp.h
int main()
{
jmp_buf test_env;
jmp_buf *test_env_p = test_env;
test_env = *test_env_p;
return 0;
}
I suspect that line 9 is the assignment before the return statement.
The assignment can be, and probably is,
On Mon, Jul 02, 2001 at 03:32:24PM +0300, Nadav Har'El wrote:
On Mon, Jul 02, 2001, Shaul Karl wrote about (main_buf = *main_buf_p) is not
syntacticly like (i = *j) ?:
#include setjmp.h
int main()
{
jmp_buf test_env;
jmp_buf *test_env_p = test_env;
test_env
On Tue, Jul 03, 2001, Shaul Karl wrote about Re: (main_buf = *main_buf_p) is not
syntacticly like (i = *j) ?:
Thank you for the responses.
You're welcome. I bet you didn't expect so many correct responses. Well,
I take the credit for the first response (my response is dated a whole 55
seconds
15 matches
Mail list logo