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

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



PureBytes Links

Trading Reference Links

Works great.  Thanks Tomasz!

JD

--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxx> wrote:
>
> 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 
>   To: amibroker@xxxxxxxxxxxxxxx 
>   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@xxx> 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 
> 
>     a..  Visit your group "amibroker" on the web.
>       
>     b..  To unsubscribe from this group, send an email to:
>      amibroker-unsubscribe@xxxxxxxxxxxxxxx
>       
>     c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service. 
> 
> 
>
------------------------------------------------------------------------------
>







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/