locked
Functions in Small Basic RRS feed

  • Question

  • Are there plans to add standard functions to Small Basic? I would like to be able to write functions that accept an argument list, rather than pass global variables to sub procedures.
    Monday, November 16, 2009 3:31 PM

Answers

  • Not from what I've read Mike.

    I use the alternative form of building arrays to pass my values in, which means I don't have to create loads of public variables.


    e.g.

    param="times=10;name=Davey Wavey!"
    helloMe()

    textwindow.pause()

    Sub helloMe
    For lwp=1 to param["times"]
    textwindow.writeline( "Hello " + param["name"])
    EndFor

    param="" ' clear params
    EndSub

    • Marked as answer by litdev Monday, January 11, 2010 11:03 PM
    Monday, November 16, 2009 7:52 PM