PureBytes Links
Trading Reference Links
|
The
error message is telling you the nature of the problem.
<FONT face=Arial color=#0000ff
size=2>
You'll
either have to say:
<FONT face=Arial color=#0000ff
size=2>
if
(k[0] > 10) // using some value for the array
index
<FONT face=Arial color=#0000ff
size=2>
or
you'll have to use the "IIF" statement like this:
<FONT face=Arial color=#0000ff
size=2>
x =
IIF(k > 10, j, a);
<BLOCKQUOTE
>
<FONT face="Times New Roman"
size=2>-----Original Message-----From: relentless1000
[mailto:cgmv@xxxxxxxxxxxxx]Sent: Monday, June 02, 2003 6:17
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] BETA
4.38 IF FUNCTION QUESTIONI'm trying to program the
following:j=5;a=22;k=Cum(1);if(k>10)
X=J;else x=a;I get the following
error:Error 3.Condition in IF, WHILE, FOR statementshas to be
Numeric or Boolean type.You can not use array here,please use []
(array subscript operator)to access array elementsI have played
with it a little bit, and its looking like the expression for the IF
statement cannot reference a variable. Is this true or am I just
messing this up?Can anybody
help?ThankscgmvSend
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
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
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|