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

RE: [amibroker] quoted text from variable assignments showing up in interpretation???



PureBytes Links

Trading Reference Links




<SPAN 
class=552151315-21082003>thanks for your thoughtful explanation Tomasz, think I 
get it.
<SPAN 
class=552151315-21082003> 
<SPAN 
class=552151315-21082003>I can see that having assignment statements return a 
value can allow very dense code. I have to say that as a programmer myself, your 
For loop thing gives me the willies (;-). I'd rather see the assignment made 
more, um, explicitly.
<SPAN 
class=552151315-21082003> 
<SPAN 
class=552151315-21082003>anyway, still quite workable, and I'm still so 
impressed with AB. so powerful, and still simple to use.
<SPAN 
class=552151315-21082003> 
<SPAN 
class=552151315-21082003>thanks,
<SPAN 
class=552151315-21082003> 
<SPAN 
class=552151315-21082003>dave
<BLOCKQUOTE 
>
  The logic is very simple. As in C/C++ each assignment 
  statement in AFL has a VALUE.
  This nice feature allows statements like this:
   
  a = b = c = 1;
   
  (assign 1 to a, b, and c variables at once 
  )
   
  which is NOT possible in other languages like Pascal, Basic, 
  etc.
   
  This allows also to make assignments inside conditional 
  expressions
   
  
  _N( tickerlist = 
  "INTC,MSFT,AAPL" 
  );
  p = 0<FONT 
  face="Courier New">;
  for( i = <FONT 
  face="Courier New" color=#ff00ff>0; ( ticker = 
  StrExtract<FONT 
  face="Courier New">(tickerlist, i ) ) != <FONT face="Courier New" 
  color=#ff00ff>""; i++ ) // assignment inside 
  for-condition{  p = p + 
  Foreign<FONT 
  face="Courier New">( ticker, <FONT face="Courier New" 
  color=#ff00ff>"C" 
  );} <FONT 
size=2>
   
  The value of text assignment is text itself.
   
  Variable = "Text";
   
  statement has a string value of "Text" and that's why it is 
  displayed by default.
  This is the same as you would write:
   
  "Text";
   
  You can easily change this behaviour by using
  EnableTextOutput( False );
   
   
   
  Best regards,Tomasz 
Janeczkoamibroker.com






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.