Documentation improvements: while, variable scope, function declarations

Hi, all. As you’ve no doubt already figured out from my post count, I’m new to Codea. I’m also new to Lua in general, so I’m learning a new language and API at the same time.

One of the roadblocks I’ve stumbled across is some shortcomings in the in-app documentation. I looked for info regarding branching and looping instructions (while/do/break, switch) and found nothing. So I’m having to do my coding with a Lua reference site open in the browser and switch back and forth between Chrome and Codea’s editor.

Likewise, I had no idea that Lua’s variable declarations are bass-ackward: variables are global unless you declare them as local; this is a HUGE issue and really needs to be in the documentation for new users.

I’m willing to help flesh out documentation, if it will improve the learning experience for new users… is there a place I can check out/submit resources for the in-app docs? Or can I just submit new pages in some format that the devs can easily integrate in to the app?

edit: turns out if/then is in the “Conditionals Overview” topic.

things to cover (just notes, not really discussion topics)

  • while/do
  • scope
  • classes
  • functions
  • variables, global-by-default, nil, type checking, local keyword
  • class inheritance

You can view and edit the documentation on GitHub. Link.


Thanks, Sky.