NO

Author Topic: Compiler wont recognize _try and _except keywords  (Read 5484 times)

Offline Elementr

  • Member
  • *
  • Posts: 2
Compiler wont recognize _try and _except keywords
« 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

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Compiler wont recognize _try and _except keywords
« Reply #1 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.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Offline Elementr

  • Member
  • *
  • Posts: 2
Re: Compiler wont recognize _try and _except keywords
« Reply #2 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

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Compiler wont recognize _try and _except keywords
« Reply #3 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)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Grincheux

  • Guest
Re: Compiler wont recognize _try and _except keywords
« Reply #4 on: June 10, 2021, 01:56:05 PM »
Frankie you are the underscore specialist :P

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Compiler wont recognize _try and _except keywords
« Reply #5 on: June 10, 2021, 02:56:26 PM »
Frankie you are the underscore specialist :P
:D Maybe not only ... I hope...
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide