none
Eval faster than static code RRS feed

  • General discussion

  • Hi,

    the following code (requires Fremy's extension (http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/18d7be0b-b130-4d5f-ad12-d1f233e4b1f5))

    linefeed = Text.GetCharacter(10)

    FCExtensions

    .Eval("GraphicsWindow.Show()" + linefeed + "For y = 0 To GraphicsWindow.Height - 1" + linefeed + "For x = 0 To GraphicsWindow.Width - 1" + linefeed + "GraphicsWindow.SetPixel(x, y, GraphicsWindow.GetRandomColor())" + linefeed + "EndFor" + linefeed + "EndFor")

     Is faster than this

    GraphicsWindow

    .Show()

    For

     

    For x = 0 To GraphicsWindow.Width - 1

    GraphicsWindow.SetPixel(x, y, GraphicsWindow.GetRandomColor())

    EndFor

    EndFor

    y = 0 To GraphicsWindow.Height - 1
    Your Signature
    Friday, October 8, 2010 4:18 PM