[futurebasic] Re: [FB] small C to FB problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2000 : Group Archive : Group : All Groups

From: Michael S Kluskens <mkluskens@...>
Date: Tue, 6 Jun 2000 22:16:07 -0400
At 1:37 PM -1000 6/6/00, Derek Smith wrote:
>On Tue, 6 Jun 2000, Robert Covington wrote:
>
> > For (i = 0, j = npol-1; i < npol; j = i++)
>> next
> >
> > ....???? What the heck is the above in real english?
>
>'---
>i = 0
>j = npol-1
>while (i<npol)
>  Inc(i)
>  j = i
>
>  'guts
>Wend
>

I don't think that is correct, I believe the correct translation is:

for (i = 0, j = npol-1; i < npol; j = i++)
guts;

or

for (i = 0, j = npol-1; i < npol; j = i++)
   {guts}

to:

i=0
j=npol-1
WHILE(i<npol)
guts

INC(i)
j=i
WEND

Note that the last argument of the "for" statement is executed after 
everything in the loop happens.  My reference is Waite's Group's C 
Primer Plus starting at page 212 (I'm only up to page 69 for my 
CtoFB3 converter, through I did put a first level "for" translator in 
it, does not handle the "," in the first argument yet or the j=i++ 
yet.  I'm setting Robert's sample aside for when I get that far).

Michael

Michael Kluskens <mkluskens@...>, alternative <mkluskens@...>

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com