PureBytes Links
Trading Reference Links
|
Stephane,
As far as I remember you write sometimes in C/C++.
In C/C++, Pascal, etc you can't not "print" function name
and call it. This would involve re-compilation at run-time and
almost no compiled language supports that. Instead you may use IIF:
find = IIF( Condition, func_1(C), func_2(C) );
It is one-liner (easier than your code).
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "Stephane Carrasset" <s.carrasset@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Saturday, June 04, 2005 2:46 PM
Subject: [amibroker] loop on Name Function_Number
> hello,
>
> if I want to loop on differents functions ( after a calling with
> #include ^_-,
>
> I can write:
>
> Choice=Param("Choice",1,1,10,1);
> if(Choice==1)
> find=func_1(C);
> else
> find=func_2(C);
> Plot(find,"",2,1); // IT WORKS FINE
>
> Why I can't write
> find= printf("func_" + NumToStr(Choice,1,True) + "(C)");
> //returns string func_2(C);
> Plot(find,"",2,1); // BAD
>
> stephane
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
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/
|