qexo-general
[Top][All Lists]
Advanced

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

[Qexo-general] Problems with reverse() and variable containing sequences


From: Stefano Santoro
Subject: [Qexo-general] Problems with reverse() and variable containing sequences
Date: Wed, 17 Mar 2004 19:30:29 -0500 (EST)

Hi,

I am using the 1.7.90 kawa jar, and when I call the reverse function
I get the following exception stack trace:

(: 22 :) reverse((1,2,3))
Argument #0 to 'reverse' has wrong type
        at gnu.mapping.WrongType.make(WrongType.java:56)
        at 
kawa.lib.lists.apply1(/home/bothner/Kawa/kawa/kawa/lib/lists.scm)
        at gnu.expr.ModuleBody.applyN(ModuleBody.java:171)
        at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:106)
        at kawa.lang.AutoloadProcedure.applyN(AutoloadProcedure.java:162)
        at gnu.mapping.Procedure.apply(Procedure.java:115)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:289)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:188)
        at kawa.Shell.run(Shell.java:233)
        at kawa.Shell.run(Shell.java:180)
        at kawa.Shell.run(Shell.java:167)
        at kawa.Shell.run(Shell.java:154)
        at kawa.repl.main(repl.java:650)
Caused by: java.lang.ClassCastException
        ... 12 more

also the following code sniplet that accesses sequences stored in a 
variable does not seem to work either:

(: 23 :) (1,2,3)[last()]
3
(: 24 :) declare variable $foo { (1,2,3) }
(: 25 :) count( $foo)
 3
(: 26 :) $foo[last()]
gnu.mapping.UnboundSymbol: Unbound symbol foo
        at 
gnu.expr.Interpreter.getDefaultSymbolValue(Interpreter.java:651)
        at gnu.expr.Interpreter.getSymbolValue(Interpreter.java:658)
        at atInteractiveLevel.apply(<stdin>:26)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:289)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:188)
        at kawa.Shell.run(Shell.java:233)
        at kawa.Shell.run(Shell.java:180)
        at kawa.Shell.run(Shell.java:167)
        at kawa.Shell.run(Shell.java:154)
        at kawa.repl.main(repl.java:650)
(: 27 :) 

By looking at the XQuery documentation that I have available 
the last statement should work. Is there perhaps another way
of doing the same?

Ciao
Stefano






reply via email to

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