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

Re: [amibroker] any way to programmatically generate an error?



PureBytes Links

Trading Reference Links

Hello,
 
Yes there is a way to cause error message using Version funciton
 
procedure assert( truth )
{
 if( ! truth )
 {
   Version( 1000 );
 }
}

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Graham
Sent: Monday, April 10, 2006 11:54 AM
Subject: Re: [amibroker] any way to programmatically generate an error?

You could always just use 1/0 to generate an error

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm



On 4/8/06, JD Fagan <jd.fagan@xxxxxxxxx> wrote:
> I want to write an assertion function that will generate an AFL error
> upon detection of a failed assertion.  Is there any way
> programmatically cause an AFL error?  The trick is that I only want it
> to fail based on a condition..
>
> I have my preferences set so that the AFL engine "Stop parsing on
> first error".
>
> procedure assert(truth, failureMessage) {
>  if (!truth) {
>    AlertIf(True, "", "Assertion Failed: " + failureMessage, type=0, 1);
>    //line of code here that will generate error if executed
>  }
> }
>
> Regards,
>
> JD
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS