Re: What's new in 2.5?

new topic     » goto parent     » topic index » view thread      » older message » newer message

> On 8  Sep 2004 11:52:07 +0200, Christian Cuvier
> <Christian.CUVIER at agriculture.gouv.fr> wrote:
> 
> 
>>>Btw, this scheme extends beyond out of range indexes. "ifx sqrt(x)=y then..."
>>>
>>>would just be a false conditional if x=-1.
> 
> 
> This is exception handling under a different name. Instead of:
> 
> 	ifx sqrt(x)=y then
> 		<code>
> 	end ifx
> 
> you want:
> 
> 	try
> 		if sqrt(x)=y then
> 			<code>
> 		end if
> 	catch
> 		<do nothin>
> 	end try
> 
> I think your best bet is to wait for 2.5 and see if you can add this
> handling yourself. Of course you might want to use ifx as a shorthand
> notation, but once you allow this on an if statement, you will want
> the same handling on while loops,

whilex is a needed addition indeed.

> for loops,

hmmm... I'd rather oush for a wfor; then wforx might be more relevant.

> assignments, 

if rhs doesn't exist, don't assign. Sounds neat, but there are people out 
there woh don't like this.

> procedure
> calls, function calls, ......
> 

I can remember your reluctant view of preventive action being taken by having 
a hook monitor the arglist. This would help implementing default routine 
params, for instance. Corrective action is seldom better than prevention.

> Regards,
> Pete

Bottom line: you are right, as long as the handler can resume program 
execution. And I'm afraid I read posts in the opposite direction by RC.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu