Re: Error in Euphoria compiler?

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

Robert Craig wrote:

> The compiler's (i.e. translator's) mandate is to make your
> program run fast. It catches all compile-time errors but is not
> required to catch run-time errors (subscripts out of bounds,
> incorrect type of data etc.).

OK. I noticed similar type check errors, such as:

   integer a
   printf( 1, "%d", a )

reports a "not enough args" error instead of "undefined variable", but it's 
the same sort of thing so it makes sense.

Besides, printf is sort of the exception to the rule of Euphoria routines. 
Even the intereter version accepts all sorts of wacky values.

> I could add a bunch of semi-redundant ad-hoc
> tests for specific errors like this in the shared front-end,
> but I'm not keen to do so, unless there's something that
> comes up with great frequency.

I agree, most of this stuff should be caught by the interpreter.

Thanks!

-- David Cuny

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

Search



Quick Links

User menu

Not signed in.

Misc Menu