Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:有无办法让参数名可变?

1楼
ljact 发表于:2013/4/6 17:19:53

例如,我想在if语句中,用ma5:=ma(c,5),又在另一个if语句中,也用ma5:=ma(c,10),但是报错,因为不能去重复定义。

是否可以有办法重复定义?或是采用参数名+变量做为新的参数名?

2楼
jinzhe 发表于:2013/4/8 11:15:54
这样是没有报重复定义的错,请把完整的公式发一下
图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看
3楼
ljact 发表于:2013/5/3 20:42:31

if DATATYPE=0 then begin
  ma5: ma(c,5);
end;

if DATATYPE=1 then begin
  ma5: ma(c,6),colorwhite;

end;

4楼
王锋 发表于:2013/5/3 22:09:49

if DATATYPE=0 then begin
  ma5: ma(c,5);
end;

if DATATYPE=1 then begin
  ma5:= ma(c,6),colorwhite;

end;


5楼
ljact 发表于:2013/5/5 9:11:17

的确不报错,但画的线也看不到了。

6楼
jinzhe 发表于:2013/5/6 9:23:10

if DATATYPE=0 then begin
  ma5:=ma(c,5);
end

if DATATYPE=1 then begin
  ma5:= ma(c,6);

end

ma5_d:ma5,colorwhite;

[此贴子已经被作者于2013-5-6 9:23:25编辑过]
共6 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01953 s, 3 queries.