On 14 Apr 2006, at 23:27, Eric M.Williams <[EMAIL PROTECTED]> wrote:

On Apr 14, 2006, at 9:42 PM, Seth Willits wrote:

On Apr 14, 2006, at 9:34 PM, Eric M.Williams wrote:

This drives me crazy. When I learned BASIC (QuickBasic 4.5 on a DOS
PC, in case you're wondering) you could specify negative steps:

for i=10 to 0 step -1
...
next

REALbasic just skips over this entire code block, apparently ignoring
the step parameter.

Anyone else find this annoying?

No, because REALbasic doesn't skip it.

for i = 10 to 0 step - 1

Huh? Here's my code from a pushbutton:

Sub Action()
    dim i as integer

    for i=10 to 0 step -1
       msgBox str(i)
    next

End Sub

Press the button, nothing happens. I'm using 5.5, incidentally.

Eric M. Williams
Oxalyn Software

This is exactly why we need details of hard- and software used to accompany the question. The 'step' keyword was implemented in RB2006r1; from the release notes:
[Chg] [All] Language: Negative step values now cause a For loop to
            iterate backwards, instead of aborting instantly. This is
            more consistent with the way other dialects of Basic work.
            (The DownTo option is still supported, since it can improve
            readability, but now it simply reverses the sign of the
            step value.)(Feedback ID: uxilkzbk)
HTH
Cheers,
Robert
MBP 2 GHz ICD, 1GB RAM, OS X v 10.4.6, RB2006r2
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to