On Mon, Jan 1, 2018 at 5:20 AM, AndyHC andy@hawthorncottage.com wrote:
Just opened up a Command Window to list off 1/3 f stops -
- why the curious indentation?
CLEAR SET DECIMALS TO 2 SET FIXED ON x=1 mc=2^(1/6) FOR i = 1 TO 30 x=x*mc ?x NEXT ?
Ah! See it now. That *IS* weird. Looks like two additional spaces indented in the first 8 numbers. Perhaps related to their length?
SET DECIMALS and SET FIXED are truly ancient xBase commands, and SET commands in general -- either global in scope or scoped to a datasession -- wreak all sorts of havoc with unintended side-effects. It's a lot better to specify what you want in the actual command than to depend on modifying the environment to suit program execution.
Try this:
FOR i = 1 TO 30 ? ROUND((2^(1/6))^i,2) && compressed algorithm NEXT
Fixed and decimals and printing to the screen are all pretty old-school, but you're running BASIC here, and not really FoxPro.