View previous topic :: View next topic
|
Author |
Message |
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
Hi Guys,
Can anyone tell me the difference between ON SIZE ERROR and ON OVERFLOW error.
Are they used interchangeably in programs or they both r different.. Please let me know
Thnx in advance
Srinath. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Hi Srinath,
srinathangya wrote: |
Can anyone tell me the difference between ON SIZE ERROR and ON OVERFLOW error.
Are they used interchangeably in programs or they both r different.. Please let me know |
I don't use either very often so I went to the Language Reference to double check and the index told the tale:
ON EXCEPTION phrase
.. CALL statement 264
.. on INVOKE statement 312
ON OVERFLOW phrase
.. CALL statement 265
.. DISPLAY statement 279
.. STRING statement 380, 389
ON phrase, SET statement 364
ON SIZE ERROR phrase
.. ADD statement 257
.. arithmetic statements 240
.. COMPUTE statement 272
.. DIVIDE statement 282
.. MULTIPLY statement 326
.. SUBTRACT statement 384, 385
Hope that helps,
Bill |
|
Back to top |
|
|
srinathangya
New User
Joined: 19 Dec 2005 Posts: 77
|
|
|
|
Thompson,
I didnt get anything from what you sent. Pls. dont mistake me. What is that you thought of saying? Could you be bit more clear.
Are you asking me to refer to Language reference Manual??
Anyway thanx for responding
Reg,
Srinath. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Srinath,
You want to understand the difference between the two phrases. And then you ask:
Quote: |
Are you asking me to refer to Language reference Manual?? |
as if it were a bad thing.
I posted:
Quote: |
ON EXCEPTION phrase
.. CALL statement 264
.. on INVOKE statement 312
ON OVERFLOW phrase
.. CALL statement 265
.. DISPLAY statement 279
.. STRING statement 380, 389
ON phrase, SET statement 364
ON SIZE ERROR phrase
.. ADD statement 257
.. arithmetic statements 240
.. COMPUTE statement 272
.. DIVIDE statement 282
.. MULTIPLY statement 326
.. SUBTRACT statement 384, 385 |
explaining that this is from the index of the language reference.
I had thought that you would look at this and see that if you wanted to look up info on "ON SIZE ERROR" you would have to decide which aspect of "ON SIZE ERROR" you needed to look at, which arithmetic type statement you needed. Similarly, I had thought that you would look at this and see that if you wanted to look up info on "ON OVERFLOW" you would have to decide which aspect of "ON OVERFLOW" you needed to look at, the CALL, the DISPLAY or the STRING.
Well I guess I'll just have to be disappointed that you "didn?t get anything" from what I sent. But what is really crushing is the idea that you hadn't yet even looked at a manual and the further feeling that to do so was beneath you.
With the attitude you are projecting, I wish you luck in your future, (but to myself I pray I never have to maintain any of your code ),
Bill
BTW, if needed I can repost this and highlight the arithmetic stataments and the verbs CALL, DISPLAY and STRING..... |
|
Back to top |
|
|
RamsIBM
New User
Joined: 08 Jan 2007 Posts: 53 Location: Chennai
|
|
|
|
Hi,
As per my knowledge.
On Size error used in Arithemetic operation.
i.e ADD A TO B ON SIZE ERROR
........
if the result is larger than B declartion then statement under the on size error will be fired...
Overflow :
This used in subprogram as well as String operation
i.e CALL A on OverFlow
......
if A is not found then statment under the OverFlow will be fired
Simillarly it will be used in String operation also ( i.e STRING & UNSTRING)
From my example you can understand the difference between those...
Correct me if I am wrong
Thanks
Rams |
|
Back to top |
|
|
csiva007
New User
Joined: 29 Sep 2005 Posts: 10
|
|
|
|
Hi Srinath,
What Rams told is correct?
Regards
Siva |
|
Back to top |
|
|
|