[Top][All Lists]

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

Re: [Bug-apl] No errro message when defining functions using

From: Juergen Sauermann
Subject: Re: [Bug-apl] No errro message when defining functions using
Date: Sat, 15 Feb 2014 17:22:38 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5


 I am afraid that the failed line number is about the granularity of error information available.
For finer location info (column number) the parser would need to track the column; currently it

Since ⎕FX is a system functions (which can be called many times) there is no interface to
provide the error cause. I could create a static member of class Parse that stores the last
parse error and/or its source location.

Note that the majority of parse errors in ∇ and ⎕FX are bad function headers. There are only a few
errors detected on the function body - they typically occur when a function is executed and not when
it is defined.

/// Jürgen

On 02/14/2014 07:05 AM, Elias Mårtenson wrote:
Thank you. I did not realise that the number indicated the line where the error occurred. I have updated the Emacs mode to display an error message and highlight the line where the error occurred now.

Is there a way to get more detailed information as to what the error was? Right now I simply display "Parse error" but it would be nice if it was a bit more precise.


On 14 February 2014 01:35, Juergen Sauermann <address@hidden> wrote:
Hi Elias,

not on my machine:

      ⎕FX 'foo[x]' 'x'

Could it be that you had foo defined earlier?

The syntax error is then due to a niladic function called with an axis
(which is no a valid pattern in APL).

The return value of 1 is the index of the line that has caused the error (foo[x]).

/// Jürgen

On 02/07/2014 01:57 PM, Elias Mårtenson wrote:
When I try to define a function that takes no arguments, but does include an axis argument, the normal function editor complains:

bad editor command '∇foo[x]' : problem 'Bad function header at Nabla.cc:495'

However, if I try to define the same function using ⎕FX, it gets defined:

      ⎕FX 'foo[x]' 'x'
EMACS_NATIVE    bar     foo     

But, it cannot be called:

      ^  ^


reply via email to

[Prev in Thread] Current Thread [Next in Thread]