Search code examples
luawiki

What exactly does the Lua Programming WikiBooks mean by "Instructions"


https://en.wikibooks.org/wiki/Lua_Programming/Statements says:

Statements are pieces of code that can be executed and that contain an instruction and expressions to use with it. Some statements will also contain code inside of themselves that may, for example, be run under certain conditions. Dissimilarly to expressions, they can be put directly in code and will execute.

What does it mean by instructions? Am I looking too deep in to it


Solution

  • That article seems very poorly written in general. Containing gems like "Assignment is [...] used to assign". Your confusion is probably also just a result of this awkward style. The way I read it, the book separates between:

    • Statements: Do something specific, like adding two values into a variable.
    • Instructions: Things you can do in general, like adding any two values.

    It seems to suggest a sort of abstraction-application relationship between the two.

    That's a very specific way of dividing between the two and it's ultimately very inconsequential, so you can probably treat them as interchangeable while reading that book.