Print

Print


Dear Ox-users,

I wonder whether the following feature of Ox is intentional:

Consider two matrices va, vb.
A call to va[<>] returns <>.
Also, va[<>] ~ vb = <> ~ vb = vb.
However, va[<>] | vb does not return <> | vb = vb, but something else!

This can cause problems. In my case, it caused a runtime error in MaxSQP.

The following program illustrates.

#include <oxstd.h>

main()
{
 decl va, vb;
 va = <1>; vb = <3>;
 println("va = ", va, "vb = ", vb);
 println("va[<>] = ", va[<>]);
 println("<> | vb = ", <> | vb);
 println("\nBUT: va[<>] | vb = ", va[<>] | vb);
}

which prints:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Ox version 3.20 (Windows) (C) J.A. Doornik, 1994-2002
va =
       1.0000
vb =
       3.0000
va[<>] =
<>
<> | vb =
       3.0000
Warning: concatenation dimensions don't match, padded with zeros
E:\test\strange.ox (11): main

BUT: va[<>] | vb =
      0.00000
       3.0000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sophocles