Compiler wont recognize _try and _except keywords

Started by Elementr, June 09, 2021, 10:25:51 PM

Previous topic - Next topic

Elementr

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

frankie

Have you used '__try' and '__except' with double underscore ?
'_try' and '_except' with single underscore aren't correct.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Elementr

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

frankie

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)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Grincheux


frankie

"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide