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

Re: [amibroker] numeric values in boolean expressions



PureBytes Links

Trading Reference Links




Hello,
 
In fact numeric values can be treated as booleans as in 
C.
Zero is interpreted as False, any non zero value (except 
empty/null)
is treated as True.
Best regards,Tomasz 
Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=jcasavant@xxxxxxxxxxxx 
  href="">Jayson 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Monday, February 10, 2003 8:39 
  PM
  Subject: RE: [amibroker] numeric values 
  in boolean expressions
  
  It 
  depends if the variable yesterdaylongpercent is a true/false variable. For 
  example;
  <SPAN 
  class=935453319-10022003> 
  <SPAN 
  class=935453319-10022003>x=c>ma(c,50);  x is either true (1) or False 
  (0)
  <SPAN 
  class=935453319-10022003> 
  <SPAN 
  class=935453319-10022003>x=ma(c,50);   x is a variable number and 
  can not be equated to true or false.
   Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: Steve Davis 
  [mailto:sdavis@xxxxxxxxxxxxx]Sent: Monday, February 10, 2003 2:13 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  numeric values in boolean expressionsCan numeric 
  values be used in a boolean expression?For example, are the following two 
  lines of code equivalent?fromLongToShort = (yesterdayLongPercent > 
  0 AND todayShortPercent > 0);fromLongToShort = (yesterdayLongPercent 
  AND todayShortPercent);I am unable to try a quick test at the 
  moment.Thanks,-StevePost 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. 
  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


  ADVERTISEMENT









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.