note of hidemaru
I. Basic syntax
1.[;]----the end of a statement.
2.[:]----the end of a label.
3.[{}]----the mark of group of statement.
4.[//]----start a new comment line.
II. Use variable
1.[#]----the first character of variable number type.
2.[$]----the first character of variable string type.
3.[=]----assignment operator
4.[+]----the sum operation of numeric variable;
the connection operation of string variable.
5.[[]...]----araay mark, the same to C Language.
6.[##]----to quote a local numeric variable
7.[$$]----to quote a local string variable.
III. Escape mark
1.[\a]----bell code:7
2.[\b]----backspace code:8
3.[\n]----new line code:10
4.[\r]----carriage return
5.[\t]----horizontal tab
6.[\v]----vertical tab
IV. OPerator
1.[+,-,*,/,%]----add, subtraction, multiply, division, mod
2.[<=, >=, <, >, !=, ==, &&, ||, !, |, &, ^]----the same as C Language.
V. [if], [while]
1.if(condition){
//statements
}
else{
//statements
}
2.while(condition){
//statements
}
VI. Keywords
1.[x]----x position from zero.(the unit is byte, chinese and japanese etc. one word is two bytes.)
2.[y]----y position from zero. the direction is from up to down, others is same to [x].
3.[date]----return the date string.
4.[year],[month],[day]----return the year, month and day string.
VII. Functions
1.val()----convert string to numeric value.if can not correctly convert, then return 0.
2.str()----opposite to [val()]
3.leftstr(s1, n1)----return n1 characters of s1 from left.
3.rightstr(s1, n1)----the difference between [leftstr] is from right.
4.midstr(s1, n1, n2)----return n2 characters of s1 from n1.
5.strlen(s1)----return the length of s1.
6.input(sLabel, sDefaultValue)
VIII. Text
1.save----save current file. if this is a new file then display a dialog.
2.saveas sDir----save as a file name.
3.question sMesg--question dialog. if click "yes", keyword result 1, else keyword result is 0.
IX. Subroutine
1. declaration
funName:
//statements
//quote the arguments with local variable name [##1, ##2...] or [$$1, $$2...]
return [##.. or $$..]; //end the subroutine with "return".
2. Call
call subrutineName [param1, param2...]; //param[N] is arguments.
To get the return value with local variable name "##return" or "$$return".
X. Deal with error
1. the value of variable is the directly ahead statement's end state, the value "true" means successfully end; "false" means faild.
2. [disableerrormsg]----make there is no error message though there is error.
3. [enableerrormsg]----opposite to [disableerrormsg].
阅读(1631) | 评论(0) | 转发(0) |