[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EasyLang bug?



PureBytes Links

Trading Reference Links



On Thu, 25 May 2000, Gary Fritz wrote:

> > In any case, if I have a block that starts 'if x=4', and x=0, the
> > block should NOT execute. Is this not correct? 
> 
> Ah, but remember you're talking about "Easy" Language here...

Oops - forgot about that, and assumed "easy" language did what was
actually written :-).

> The Series functions are "pulled out" and called *before* 
> the rest of the code executes, if I remember right, and then if you 
> actual execute the code that "calls" the function, that code just 
> references the function return value.

Sounds like a bit of a nightmare. The 'length' input to StdErr is
variable; if pulled out, it would not calculate the right value. 

> My guess is, StandardError is a Series function, and when X=0 the 
> parameters to StandardError are such that StandardError barfs.

Never thought to check StdErr, but in the Omega routine there is not a
check for 0 before dividing. Turns out the 'barf' value for length is 2,
not 0, because of the way they do the calc. I did a quick-and-dirty
rewrite of the Omega routine to check for 0, and it does, indeed, run OK.
It IS called, even though it is 'not called' :-).

Turns out the minimum value this variable can take just happens to be 2<g>.

> How to work around this?  It's grubby since you can't just say "if 

<good work-around snipped>

Thanks much for the suggestion. I don't actually use that chunk of code
here (a leftover from another routine) and actually removed it. Also
improved the calc speed, too :-).

Your analysis of the problem was exactly correct.

Many thanks,

Larry