Reader small image

You're reading from  Lua Quick Start Guide

Product typeBook
Published inJul 2018
Reading LevelBeginner
PublisherPackt
ISBN-139781789343229
Edition1st Edition
Languages
Right arrow
Author (1)
Gabor Szauer
Gabor Szauer
author image
Gabor Szauer

Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.
Read more about Gabor Szauer

Right arrow

Operators

Operators such as addition +, string concatenation .., and even the assignment operator = have been used throughout this book. Let's take some time to cover in detail what operators are and how they work. Operators fall into one of the following categories:

  • Arithmetic operators do math.
  • Relational operators always return a Boolean value: true or false. Relational operators are used to compare the relationship between two things, for example, by checking whether one number is smaller than another number.
  • Logical operators express complex relations such as and/or. For example, logical operations can be used to check whether a number is less than seven AND greater than two.
  • Misc operators: All other operators, such as assignment, fall into this category.


Operators can be unary or binary. A unary operation works on only one operand. For example, the minus sign (...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Lua Quick Start Guide
Published in: Jul 2018Publisher: PacktISBN-13: 9781789343229

Author (1)

author image
Gabor Szauer

Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.
Read more about Gabor Szauer