= | |||||||
Type | operator | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Synonyms | is | ||||||
Summary | Compares two values and evaluates to true if they are equal, false if they are not equal. | ||||||
Introduced | 1.0 | ||||||
Changes | The ability to compare two arrays using = was added in version 3.5. Previously, comparing two arrays would have converted both arrays into the empty string, and always returned true. | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Related | Keyword: character, numeric Operator: <>, contains Property: caseSensitive Glossary: property, operator, case-sensitive, scientific notation, value, string, expression | ||||||
Description | Use the = (equality) operator to find out whether two numeric expressions yield the same number or whether two strings are equivalent.
When comparing strings, the = operator compares the two values character by character. If the caseSensitive property is true, the comparison between two strings treats uppercase letters as coming before lowercase letters. If the caseSensitive property is false, the comparison is not case-sensitive, so "a" = "A". When comparing arrays, the = operator first checks if the number of elements in each array is the same, if not the two arrays are different. If the arrays have the same number of elements, they are equal if each element is equal. Specifically this means: array1 = array2 if (and only if):
| ||||||
Tags | math |