Page 1 of 1

For ... Step ... Next ... small addition, drastic help

Posted: Fri Mar 12, 2004 1:08 am
by Shannara
I think this falls along the line for the #PB_ANY Constant.. aka, a huge/drastic help...

I need a way to use a variable for a Step instead of a constant or a set Number. This little addition (that is in VB and other languages) would go a long way into allowing PB to handle dynamic equazions. (sp?). For example:

X1.l = SpriteWidth(DefaultSkin\Background)
Y1.l = SpriteHeight(DefaultSkin\Background)
For X=0 To myWidth Step X1
For Y=0 To myHeight Step Y1
DisplaySprite(DefaultSkin\Background, X, Y)
Next
Next

The above code is not possible because PB requires a constant or a Number. Not usefull for dynamic needs :(

Re: For ... Step ... Next ... small addition, drastic help

Posted: Fri Mar 12, 2004 4:52 am
by PB
> I need a way to use a variable for a Step instead of a constant

viewtopic.php?p=49635

Posted: Sat Mar 13, 2004 12:38 am
by Shannara
Awesome, thank you :)