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

RE: [amibroker] Simple function help please !



PureBytes Links

Trading Reference Links

Hi,

I'm trying to add 2 functions to my current project
but I continue to get a syntax error when executing.
I have drasticly simplified my functions for this
message but the error still occurs with this simple
code. The syntax error pointer always appears
under the first fuction call "Calc_1(5).
Can anyone tell me what is the syntax error in
this code ?
Thanks a lot....
Gosub283
============================

TestNumber = 1;

NewNumber = IIf( TestNumber >=0 , Calc_1(5), Calc_2(5)); 
                                ++++++++++++
 function Calc_1(number)
{
   //Test should return "10"
   return number * 2
}

 function Calc_2(number)
{
    //Test should return (-10)	
   return number * -2;
}



Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/