Search code examples
lualuau

What is a great way to remember how to script


I keep forgetting what stuff does every now and then. at one point I got so good I was going to make tutorials for beginners but now I'm back to mediocre scripting level.


Solution

  • 'Comments in Code as Documentation'

    -- SomeCode.lua -- Version: 0.01 -- Author: Code R. -- Date: --:--:--
    --[[ I put out and return the String: Lua
         Example: lua SomeCode.lua
    ]]
    local str = _VERSION:sub(1, 3) -- Method sub(1, 3) on String _VERSION
    print(str)
    return(str)
    

    Than other People have a chance to understand whatfore this is too.

    EDIT
    I love REXX
    A REXX Script has to be start with a Comment /* I am REXX Code */
    Thats a Coercion thats makes Sense and even it is easy to use say(sourceline([number])) to put it out as a minimalistic: HELP!