Hi,
Thnx for clicking,
I'm Dhananjay, And these days I'm busy in developing a s/w in C. I've a prob? Do u know how to trap events in 'C'. like vb or java?
Plz revert me.
Thnx again.
Hi,
Thnx for clicking,
I'm Dhananjay, And these days I'm busy in developing a s/w in C. I've a prob? Do u know how to trap events in 'C'. like vb or java?
Plz revert me.
Thnx again.
What types of events?
If you are talking about ON ERROR GOSUB|GOTO or ON UEVENT GOSUB|GOTO then no there is nothing like that.
You can trap for events by writing interrupt handlers, new signal handlers (in signal.h), and by writing error trapping code inside of your program. Most functions, interrupts, etc., will return a value if the operation was successful or if it was not. Interrupts will return a value in _AX (most will) and most handlers have docs which explain what the error was according to that value.
There are other ways but for the most part in C you take care of the error handling. Limited error checking means more speed for your program and less 'C' overhead.
VB will check the bounds of your array to see if you overran them. C assumes you should be smart enough not to do that and so allows you to write off the end of the array into whatever is beyond your array, even if it's Windows that's beyond your array. No bounds checking in C for arrays.
If you are talking about Windows events, yes you can respond to Windows events. Check the Windows board for lots of info about Windows events and how to respond to them.