Re: [QuantLib-svn] SF.net SVN: quantlib: [14284] trunk/QuantLib/ql/termstructures

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib: [14284] trunk/QuantLib/ql/termstructures

Luigi Ballabio

On Wed, 2008-02-06 at 05:07 -0800, [hidden email] wrote:

> Revision: 14284
>           http://quantlib.svn.sourceforge.net/quantlib/?rev=14284&view=rev
> Author:   nando
> Date:     2008-02-06 05:07:00 -0800 (Wed, 06 Feb 2008)
>
> Log Message:
> -----------
> increased error messages' information
>
> @@ -97,7 +97,7 @@
>          // check that there is no instruments with invalid quote
>          for (Size i=0; i<n; ++i)
>              QL_REQUIRE(ts_->instruments_[i]->quoteIsValid(),
> -                       "instrument with invalid quote");
> +                       io::ordinal(i) << " instrument has an invalid quote");
>  
>          // setup instruments
>          for (Size i=0; i<n; ++i) {

Shouldn't the above be io::ordinal(i+1)? (So that the first instrument
is reported as "1st" and not as "0th"...)

Luigi


--

The surest way to make a monkey of a man is to quote him.
-- Robert Benchley



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: [QuantLib-svn] SF.net SVN: quantlib: [14284] trunk/QuantLib/ql/termstructures

Ferdinando M. Ametrano-3
On Wed, Feb 6, 2008 at 3:18 PM, Luigi Ballabio <[hidden email]> wrote:
>  >          // check that there is no instruments with invalid quote
>  >          for (Size i=0; i<n; ++i)
>  >              QL_REQUIRE(ts_->instruments_[i]->quoteIsValid(),
>  > -                       "instrument with invalid quote");
>  > +                       io::ordinal(i) << " instrument has an invalid quote");
>  >
>  Shouldn't the above be io::ordinal(i+1)? (So that the first instrument
>  is reported as "1st" and not as "0th"...)

You're right: I love your picky attitude :-)
In the current library io::ordinal was used in the i+1 fashion almost
nowhere... so I went ahead and fix it:
http://quantlib.svn.sourceforge.net/viewvc/quantlib?view=rev&revision=14292

ciao -- Nando

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev