Jump to content

About lines


Cyandie

Recommended Posts

Posted

okay so whats the difference from such codes like this

if (object == 1) then 

to

  
if object == 1 then 
  

?

Current Projects

Cyandie's Cops and Robbers( 10% )

  • Moderators
Posted

and if you write it like this:

if object == 2 or (object == 1) then

Will it first check 1 and than it will check 2?

or still 2 > 1.

In math first thing to do > ( )

?

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

None, though I use the 2nd style - it makes the code less ugly and doesn't give such a confusing luck (and you save 2 bytes!)

This

if var then 

is the same as

if ((((((((((var))))) == (((((var2)))))))))) then 

Retired

Posted
None, though I use the 2nd style - it makes the code less ugly and doesn't give such a confusing luck (and you save 2 bytes!)

This

if var then 

is the same as

if ((((((((((var))))) == (((((var2)))))))))) then 

Exactly, save two bytes is saving! Recycle! :P

If I helped you, please click the like button on the right ;) Thanks!

Posted

I don't use it at all. I only use it when it's needed, which means for example math. We all know when we need brackets in math, no?

If I helped you, please click the like button on the right ;) Thanks!

Posted

Erm, '()' take barely 4 bits. ( 1 byte = 8 bits )

"First they ignore you, then they laugh at you, then they fight you, then you win."

- Mahatma Gandhi (1869-1948)

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...