[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

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

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/