Thread Rating:
  • 295 Vote(s) - 2.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page 7: Summary
06-16-2011, 03:57 PM, (This post was last modified: 06-23-2011, 04:03 PM by ashimo.)
#1
Page 7: Summary
TRY 2 Overview

Event handler structure



on

Code:
{on event-type do body}
{on event-type at target-var[:target-type] do body}
{on event-var:event-type at target-var[:target-type] do body}

where
  • event-var:event-type: binds a variable to the event.
  • target-var[:target-type]: binds a variable to the target.
  • body is the code for the event handler procedure.



Branching expressions



if

Code:
{if condition-1 then
    code-block-1
elseif condition-2 then
    code-block-2
elseif condition-3 then
    code-block-3
    ...
elseif condition-n then
    code-block-n
[else
     code-block-n+1]
}

where
  • condition-1, condition-2, ...: are Boolean expressions.
  • code-block-1, code-block-2, ...: each consist of one or more Curl language expressions.



switch

The switch expression has the following syntax:

Code:
{switch compare-expr [using compare-operator]
     case value-1 do
        code-block-1
     case value-2 do
        code-block-2
        ...
     case value-n do
        code-block-n
        [else code-block-n+1]
    }


where
  • compare-expr, value-1, value-2, value-n: are Curl language expressions. These expressions can evaluate to any Curl language type.
  • compare-operator: the operator that the Curl language uses when comparing compare-expr to value-1, value-2, and so on.
  • code-block-1, code-block-2, code-block-n: consist of one or more Curl language expressions.



Types of graphical containers


Attached Files
.png   2-4.PNG (Size: 13.48 KB / Downloads: 490)
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Page 8: Extra Practice ashimo 0 3,581 06-16-2011, 04:05 PM
Last Post: ashimo
  Page 6: Let’s look at the make-up of this game ashimo 0 3,260 06-16-2011, 03:50 PM
Last Post: ashimo
  Page 5: Application... A “Push the Button in 10s” Game ashimo 0 3,213 06-16-2011, 03:33 PM
Last Post: ashimo
  Page 4: Structure of our program that uses events ashimo 0 2,906 06-16-2011, 03:30 PM
Last Post: ashimo
  Page 3: Using Different Events ashimo 0 3,127 06-16-2011, 03:25 PM
Last Post: ashimo
  Page 2: Structure of a Program that Displays Values input from Controls ashimo 0 3,015 06-16-2011, 02:18 PM
Last Post: ashimo
  Page 1: Making a Simple Action Game ashimo 0 2,815 06-16-2011, 02:03 PM
Last Post: ashimo
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('53')