Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Indentation helps make code easier to read and understand. Indentation helps to visually separate different Block statements to show their hierarchical relationship. You can especially appreciate this when working with a for loop and if statements

Select a block and click tab. This is very helpful trick in translator to get all the block commands aligned in the editor.

 Start with some code which isn't well aligned in the translator
function main(Data)
   for i=1, 1000 do
      if i == 500 then 
           trace(i)
              end
                 end
end
 Select the whole block, and then press tab

Before:

 Tada! The editor will align all the blocks

And after:

This is a very helpful technique for making your code easier to read and understand.

See Block statements

  • No labels