Jump to content

What is the ;


Zarajj

Recommended Posts

Posted

It really doesn't serve a purpose in Lua, though some people that generally program in languages such as C++ or C# will often make use of the semicolon even when scripting in Lua simply because it becomes sort of a habit.

In terms of other languages where using the semicolon is indeed mandatory, it generally marks the end of a line or block of code. For example, think of it like this;

local myVariable = 10; outputChatBox(tostring(myVariable)) 

To be the same as this;

local myVariable = 10 
outputChatBox(tostring(myVariable)) 

It's not necessary and it doesn't cause any syntax errors, so it's entirely up to personal preference.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...