[futurebasic] Re: [FB] [ANN] FBtoC 1.0.7

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2008 : Group Archive : Group : All Groups

From: Stu Cram <stu@...>
Date: Fri, 28 Mar 2008 08:45:20 -0600
On Mar 28, 2008, at 3:50 AM, Rich Love wrote:
> New feature:
> - for/next loops may be executed zero times
> for j = 1 to 0
>  print "Never get here"
> next
--------------

I hope FBtoC does not change the way FOR loops operate in any other  
ways...

I'm curious how FBtoC handles FOR loops with non-integer control  
variables or with the STEP option as in this example?

	DIM AS DOUBLE d
	FOR d = 1 TO 0 STEP -.1
	  PRINT USING "##.####"; d
	NEXT d

Also, will FBtoC allow the control variable to be modified within the  
FOR loop as in this example?

	DIM AS INTEGER j
	DIM AS DOUBLE amt
	amt = 0.01
	FOR j = 1 TO 300
	  amt = amt * 2
	  PRINT USING ###"; j;
	  PRINT USING "###,###.##"; amt
	  IF amt > 10000 THEN j=999
	NEXT J

Just some more musings - I generally agree that the structures of  
BASIC should remain the same but that outdated/old MACOS ideas be  
removed or updated. BASIC was developed for Beginners; right now FB  
is not, IMO. Maybe there's a need for FB-Lite that uses a small set  
of MAC-OSX options such as simple windows, buttons and edit/picture  
fields, and some graphics that hide the details from the programmer.  
Those wanting more controls or control of the controls would upgrade  
to FB-Pro.

Oops. Now I'm really starting to ramble. As I said, just my musings.

-Stu