Pelles C forum

C language => Windows questions => Topic started by: Elementr on June 09, 2021, 10:25:51 PM

Title: Compiler wont recognize _try and _except keywords
Post by: Elementr on June 09, 2021, 10:25:51 PM
Hi.

I have created a windows console program and would like to add SEH. Try as I might I cannot get the compiler to recognize the "_try" and "_except" keywords. I have also tried "try" and "except" to no avail.

I am using version 10.00.6 and I have turned windows extensions on.

I have thoroughly scanned this forum and it doesn't seem that anyone else has had this precise problem.
Any assistance with this problem would be greatly appreciated.

I would not consider myself an advanced C coder but generally get my programs to work. I am more comfortable in assembly for embedded systems rather than C for windows. I found Pelles as I was looking for a simple IDE which would be comparable to my old Turboc (for DOS) which was excellent and loaded off a few floppies which I still have. I must say I'm very impressed by Pelles and this forum. It has been a treasure trove of information.

Thanks in advance,
Richard
Title: Re: Compiler wont recognize _try and _except keywords
Post by: frankie on June 10, 2021, 12:05:43 AM
Have you used '__try' and '__except' with double underscore ?
'_try' and '_except' with single underscore aren't correct.
Title: Re: Compiler wont recognize _try and _except keywords
Post by: Elementr on June 10, 2021, 01:27:58 AM
Oh wow. I can't believe it is that simple. All this time I thought that was just a single underscore. It recognizes them now.

Thank you so much for your help frankie! I really appreciate it.

Cheers,
Richard
Title: Re: Compiler wont recognize _try and _except keywords
Post by: frankie on June 10, 2021, 11:36:31 AM
You're welcome Richard.
Normally big problems are always banal mistakes.
I'm also doing a lot of work on embedded systems, nowadays is really amazing with actual hardware...  ;)
Nothing to do with old 68000 68010 80186 8080 8085 Z80 PIO, SIO, DMA etc...  8)
Title: Re: Compiler wont recognize _try and _except keywords
Post by: Grincheux on June 10, 2021, 01:56:05 PM
Frankie you are the underscore specialist :P
Title: Re: Compiler wont recognize _try and _except keywords
Post by: frankie on June 10, 2021, 02:56:26 PM
Frankie you are the underscore specialist :P
:D Maybe not only ... I hope...