Chapter 5: Advanced Functions and Control Structures
Downloads
This chapter does not have any code to download
Table of Contents
- Chapter 5: Advanced Functions and Control Structures - 77
- Multiple Return Values - 77
- Converting Hex to RGB - 77
- Assigning Multiple Values - 78
- Missing Return Values? - 79
- Multiple Return Values in World of Warcraft - 79
- Using a Dummy Variable - 80
- Using the select() Function - 81
- Accepting a Variable Number of Arguments - 81
- Declaring a Vararg Function - 82
- Using select() with ... - 83
- Generic for Loops and Iterators - 84
- Syntax of Generic for - 84
- Traversing the Array Part of a Table - 85
- Traversing an Entire Table - 86
- Clearing a Table - 86
- Using Other Iterators - 87
- Sorting an Array of Table Data - 87
- Define Example Data - 88
- Default Sort Order - 88
- Creating a Comparison Function - 88
- Creating a More Complex Sort Function - 89
- Summary - 90