Welcome to APLNext Sign in | Join | Help
in
Community Website
Blogs Forums

An error, a bug and a question.

Last post 12-29-2006, 10:10 AM by joe.blaze. 1 replies.
Sort Posts: Previous
  • An error, a bug and a question.

     12-28-2006, 3:26 PM

    The Error:
    I copied several legacy functions into a project and was delighted to see how easily I got everything to build without problem.
    I then made a change (maybe added an overload, I'm not sure) and got this error:
     

    Error    1

               

    DESCRIPTION:

    Unable to cast object of type 'APLNext.APL.Compiler.DynOpToken' to type 'APLNext.APL.Compiler.NameToken'.

     

    FILE:

    C:\Program Files\MSBuild\AplNext\AplNext\1.0\AplNext.targets        

     

    LINE: 14          COLUMN: 5,          PROJECT: APLN_KregCL_1

    I closed the solution and reopened then tried the build again and the build worked.
    Then I changed something else and built and got the same error,, same file, location everything.
    I reopened the solution, rebooted, made further changes, (tried building after each action) and still get this error.
     
    ____________________________________________
    The Bug:
    Problem with ⎕fmt

    n←100.93  10503  0  ¯1201

     

    'F10.2'  fmt  n

     

    F81012    F8105032   F82   ¯F812012

    ____________________________________________

    The Question:
    Should we expect the ToSting and Datarepresentation methods on Visual APL variables to do anything useful in the future?
    Right now they seem to return generic information as following screen output shows:

          s'test'

          ⎕dr s

    82

          s.DataRepresentation

    <method: DataRepresentation on VisualCielo.Numeric.cvar>

         

          s.ToString

    <method: ToString on VisualCielo.Numeric.cvar>

         

          n100.93 10503 0 ¯1201

           ⎕dr n

    645

          n.DataRepresentation

    <optimized method DataRepresentation of VisualCielo.Numeric.cvar object at 0x024EA8E9>

         

          n.ToString

    <method: ToString on VisualCielo.Numeric.cvar>

    ____________________________________________
  • Re: An error, a bug and a question.

     12-29-2006, 10:10 AM

    Reply to your question: () needed to make the method operate on the argument, otherwise a new object is being created which is an instance of the method.

    S←'test'

    S.ToString( will display the overload options for the ToString method on S.

    Try SS←S.ToString() and then try S.GetType() and SS.GetType().

    Similarly for S.DataRepresentation( to see its overloads.

    S.ToString without the () is returning a new object and not returning X.ToString() which is the desired operation of ToString() on X.

View as RSS news feed in XML
Powered by Community Server, by Telligent Systems