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

Re: [amibroker] For loop



PureBytes Links

Trading Reference Links




Thanks Walt and Herman.  Looks like there are 3 
ways to "skin the cat."
 
Bill
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Herman vandenBergen 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Tuesday, May 27, 2003 10:31 
PM
  Subject: RE: [amibroker] For loop
  
  <FONT face=Arial color=#0000ff 
  size=2>You can increment a loop by any 
  amount:
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>increment = 0.5;
  <FONT face=Arial color=#0000ff 
  size=2>for ( n = 0; n < 100; n = n + increment; ) { ... 
  }
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>I think I even modified n within the loop, to break out or do 
  other funny things.
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>Herman.
  
    <FONT face=Tahoma 
    size=2>-----Original Message-----From: walt 
    [mailto:WSCHWARZ@xxxxxxxxxxxxx]Sent: May 28, 2003 10:13 
    AMTo: <A 
    href="">amibroker@xxxxxxxxxxxxxxxSubject: 
    RE: [amibroker] For loop
    <FONT face=Arial color=#0000ff 
    size=2>Bill,
    <FONT face=Arial color=#0000ff 
    size=2> 
    <FONT face=Arial color=#0000ff 
    size=2>use a function...
    <FONT face=Arial color=#0000ff 
    size=2> 
    <FONT face=Arial color=#0000ff 
    size=2>function inc(a_num)
    <FONT face=Arial color=#0000ff 
    size=2>{
    <FONT face=Arial color=#0000ff 
    size=2>a_num=a_num+1
    <FONT face=Arial color=#0000ff 
    size=2>return a_num
    <FONT face=Arial color=#0000ff 
    size=2>}
    <FONT face=Arial color=#0000ff 
    size=2> 
     
    
      <FONT face=Tahoma 
      size=2>-----Original Message-----From: wavemechanic 
      [mailto:wd78@xxxxxxxxxxxx]Sent: Tuesday, May 27, 2003 10:04 
      PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: 
      [amibroker] For loop
       
      <BLOCKQUOTE 
      >
        ----- Original Message ----- 
        <DIV 
        >From: 
        <A title=WSCHWARZ@xxxxxxxxxxxxx 
        href="">walt 
        To: <A 
        title=amibroker@xxxxxxxxxxxxxxx 
        href="">amibroker@xxxxxxxxxxxxxxx 
        
        Sent: Tuesday, May 27, 2003 9:31 
        PM
        Subject: RE: [amibroker] For 
        loop
        
        <FONT face=Arial color=#0000ff 
        size=2>Bill,
        <FONT face=Arial color=#0000ff 
        size=2> 
        <FONT face=Arial color=#0000ff 
        size=2>"for" can be nested...
        <FONT color=#0000ff 
        size=2> 
        <FONT color=#800000 
        size=2>Thanks.  I was hoping for an increment statement.  
        Absent that I guess an accumulator for i would probably be the way to 
        go, as nesting would quickly get very messy and large.  
        
        <FONT face=Arial color=#0000ff 
        size=2> 
        <FONT face=Arial color=#0000ff 
        size=2>for(i=1;i<10;i++)
        <FONT face=Arial color=#0000ff 
        size=2>{
        <FONT face=Arial color=#0000ff 
        size=2>    for(i2=1;i2<i;i2++)
            <FONT face=Arial 
        color=#0000ff size=2>{
        <SPAN 
        class=093582701-28052003>        
        i3=i2+i
            <FONT face=Arial 
        color=#0000ff size=2>}
        <FONT face=Arial color=#0000ff 
        size=2>}
        <FONT face=Arial color=#0000ff 
        size=2> 
        <FONT face=Arial color=#0000ff 
        size=2>Walt
        
          <FONT face=Tahoma 
          size=2>-----Original Message-----From: wavemechanic 
          [mailto:wd78@xxxxxxxxxxxx]Sent: Tuesday, May 27, 2003 7:32 
          PMTo: AmiBrokerSubject: [amibroker] For 
          loop
          Does the FOR loop statement, which is 
          normally shown as for (xxx; yyy; zzz), permit the addition of another 
          statement for incrementing the variable xxx?  And if so, what is 
          the syntax?
           
          TIA
           
          BillSend 
          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. Send 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. Send 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. 
      Send 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. 
    Send 
  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


  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.