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

[amibroker] Re: Simple function help please !



PureBytes Links

Trading Reference Links




Hi,
 
<FONT 
color=#800000>function<FONT 
size=2> Calc_1(number) {    <FONT 
color=#008000>//Test should return "10"<FONT 
face="Courier New">    
return number * 
2<FONT 
size=2>; } <FONT 
color=#800000>function<FONT 
size=2> Calc_2(number) { 
    //Test should return 
(-10)   <FONT 
size=2>    <FONT 
color=#800000>return number * -<FONT 
color=#ff00ff>2<FONT 
color=#000000>; } TestNumber = <FONT 
color=#ff00ff>1<FONT 
color=#000000>; NewNumber = IIf<FONT 
color=#000000>( TestNumber >=0<FONT 
color=#000000> , Calc_1(5<FONT 
color=#000000>), Calc_2(5<FONT 
face="Courier New">)); <FONT 
color=#000000>Filter =<FONT 
color=#ff00ff>1<FONT 
color=#000000>; AddColumn<FONT 
color=#000000>( NewNumber, "NewNumber"<FONT 
color=#000000>); 
Regards,William Peters<A 
href="">www.amitools.com
-----Original Message-----From: gosub283 [<A 
href="">mailto:gosub283@xxxxxxxxx]Sent: 
Thursday January 1, 2004 4:51 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
[amibroker] Simple function help please !Hi,I'm trying to 
add 2 functions to my current projectbut I continue to get a syntax error 
when executing.I have drasticly simplified my functions for thismessage 
but the error still occurs with this simplecode. The syntax error pointer 
always appearsunder the first fuction call "Calc_1(5).Can anyone tell me 
what is the syntax error inthis 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@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx(Web page: <A 
href="" 
target=_blank>http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="" 
target=_blank>http://groups.yahoo.com/group/amibroker/files/groupfaq.htmlYahoo! 
Groups LinksTo visit your group on the web, go to: <A 
href="" 
target=_blank>http://groups.yahoo.com/group/amibroker/To unsubscribe 
from this group, send an email 
to: amibroker-unsubscribe@xxxxxxxxxxxxxxxYour use of Yahoo! 
Groups is subject to: <A href="" 
target=_blank>http://docs.yahoo.com/info/terms/


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 the Yahoo! Terms of Service.