The Luban Programming Language

 

Peter X. Huang

12/2005

 

 

 


Contents

1     What Is Luban.. 5

2     Start Scripting Luban.. 6

2.1      Hello World.. 6

2.2      Procedural Statements. 6

2.2.1       Expression and Assignment 6

2.2.2       Flow Control 7

2.2.3       Compound Statement: 8

2.2.4       Component Property Batch Setting. 8

2.2.5       Comments. 8

2.3      Luban Built-In Data Types. 8

2.3.1       Double and Integer: 8

2.3.2       Boolean. 9

2.3.3       Character. 9

2.3.4       String. 9

2.3.5       Vector, Map and Set 10

2.4      Common Operations For All Luban Types. 11

2.4.1       Arithmetic Alike Operation Examples. 11

2.4.2       foreach Statement And Container Type. 12

2.4.3       Common Member Function Calls. 13

2.5      Null and Error.. 13

2.6      Parallel Computing: Threading and Synchronization.. 13

2.7      Tangled Threads Surprise. 14

2.8      Everything Is Object.. 15

3     Introduction to Luban Component Structure. 16

3.1      Define a Luban Structure. 16

3.2      Hello World Structure with Input and Output.. 17

3.3      More On Use of Luban Structure. 18