Programming Analysis/General Structure
(using ActionScript)
http://www.adobe.com/devnet/actionscript/learning.html
Syntax语法>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> Case Sensitivity
大小写
>> Semicolons
分号
>> Parentheses
括号
>> Code Blocks
代码块
>> Whitespaces
空白
>> Space
>> Tab
>> Line Break
>> Comments
注释
>> Single-Line Comment
>> Block Comment
>> Literals
字面量
>> Keywords and reserved words
关键字和保留字
>> statments
>> attribute keywords
>> definition keywords
>> directives
>> namespaces
>> primary expression keywords
>> Slash syntax
斜杠
Variables变量>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> Naming Limatations
命名约束
>> Not keywords or reserved words
不能是关键字或保留字
>> Start
第一个字符
>> letter | _ | $
>> Following
接着
>> letter | _ | $ | num
>> Unique
名称是否唯一
>> Naming Convention
命名惯例
>> camelCase
>> _ for private
>> $ for static
>> descriptive var
>> Access Control Atrribution
访问控制属性
>> public
>> private
>> protected
>> internal
>> Declaration
声明
>> access_control var + var_name: data_type
>> Assignment
赋值
>> var_name = var_value
>> Constants
常量
>> const CAPS_WITH_UNDERSCORE_SEPARATE
Data Types数据类型>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> Primitive Data Types
基本数据类型
>> num: int, uint, Integer, Number
>> str: String
>> bool: Boolean
>> nul: Null, void
>> Complex Data Types
复杂数据类型
>> arr: Array
>> func: Function
>> err: Error
>> class: Object
>> util: Date, RegExp, XML, XMLList
>> Type Checking
类型检查
>> Compile-time Type Checking
编译时类型检查
>> Runtime Type Checking
运行时类型检查
>> Data Typing Descriptions
数据类型描述
>> literal
>> max, min
>> defaults
>> storage
>> Type Convention
类型转换
>> Implicit
隐式
>> assignment
>> function parameters
>> return from functions
>> operators, for example +
>> explicit
显式
Operators&Expression操作符和表达式>>>>>>>>>>>>>>>>>>>>>>
>> Types
分类
>> arithmetic
>> assignment
>> comparison
>> logical
>> bitwise(logical & shift)
>> others
>> precedentce and associativity
优先级和结合性
>> Primary
>> Postfix
>> Unary
>> Multiplicative
>> Additive
>> Bitwise shift
>> Relational
>> Equity
>> Bitwise AND
>> Bitwise XOR
>> Bitwise OR
>> Logical AND
>> Logical OR
>> Conditional
>> Assignment
>> Comma
Statments & Control Flow语句和流程控制>>>>>>>>>>>>>>>>>>
>> loops
循环
>> for
init, test, update, body
>> for..in
>> for each..in
>> while
>> do..while
>> break
>> continue
>> label
>> conditions
条件
>> if
>> if..else
>> if..else if..else
>> switch
>> case
>> exception
异常
>> throw
>> try..catch..finally
>> super
>> return
>> with
>> default
Arrays数组>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> creating
创建
var arr_name:Array = new Array(..);
>> manipulating
控制
>> push/pop
>> index
>> shift/unshift/splice
>> sorting
排序
>> sort
>> homogeneous, heterogeneous, sparse
>> multidimension
>> looping
>> for, .length
Associative Arrays, Maps, Dictionaries关联数组,映射,字典>
>> creating on array
基于数组
>> var map:Object = new Object();
>> array index
>> literal index
>> deleting keys
删除键
>> delete map["key"];
>> looping
for/for..in/for each..in
>> creating on dictionary
>> var map:Dictionary = new Dictionary()
>> object keys
>> weak keys
Vectors & ByteArrays向量和字节数组>>>>>>>>>>>>>>>>>>>>>>
>> Vector
>> creating
>> var vec:Vector.<..> = new Vector.<..>(..);
>> manipulating
>> push/pop
>> index
>> dense vector
>> looping
>> for/.length
>> ByteArray
>> creating
>> var arr:ByteArray = new ByteArray()
>> reading & writting
>> storage
>> position
>> looping
while/.bytesAvailable
>> compressing
>> deflat, inflate
>> object serialization
Functions函数>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> definition
定义
>> access_control function func_name func_params:return_type body
>> calling
调用
>> func_name(func_params)
>> function parameters and arguments
函数参数
>> default parameter values
默认值
>> passing by value/reference
>> primitive data types
by value
>> complex data types
by reference
>> ...(rest) paramenter
变长参数
>> returning value
>> function scope
函数作用域
>> func closure
函数闭包
>> as object
passing by reference
>> anonymous function
匿名函数
>> var var_name:Function = function func_params:return_type func_body
Package包>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> creating
创建
>> package pkg_name pkg_body
>> importing packages
导入包
>> import pkg_name.class_name
>> access control
访问控制
>> declare var & func & class
>> organization and hierarchy
组织和继承
>> fully qualified names and uniqueness
Namespace名称空间>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> definetion
定义
>> namespace ns_name = ..
>> applying
应用
ns_name func_name|.. = ..
>> referencing namespace
引用名称空间
>> use namespace ns_name
>> using namespace
使用命名空间
>> ns_name::..
Garbage Collection垃圾回收>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> Memory Allocation
>> GCHeap
>> Heap & Stack
>> Implementation
>> deferred reference counting
>> mark/sweep
>> weak reference
>> conservative collection
>> incremental collection
>> imminence
Object-Oriented面向对象>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> Objects and Classes
对象和类
>> Object
>> Classes, instances, and instantiation
>> public var firstSprite:Sprite = new Sprite();
>> Dot notation
>> Writing class
>> package pkg_name {..}
class cls_name {..}
>> class attributes
>> dynamic
>> final
>> internal(default)
>> public
>> contructor
>> public function cls_name(){}
>> Inheritance
继承
>> extends
>> Encapsulations
封装
>> implicit getters and setters
>> Composition and Aggregation
组合和聚合
>> Polymorphism and interfaces
多态和接口
>> interface
ActionScript_Syntax
最新推荐文章于 2021-02-22 21:43:47 发布