basic语言的基本命令.doc
文本预览下载声明
basic语言的基本命令
Basic command (2009-09-2420:34:02)
Reprint TAB: it classification: compiler authoring
The assign statement (LET) (format) LET variable = the expression (function) assigns a data to a variable. The essay is made out of the basic statement. The value of the expression is the data to be assigned to the variable. The expression can be either a number or an arithmetic. 【 application 】 LET A = 5 (2) suspension of statements (PAUSE) PAUSE time format 】 【 【 features 】 to suspend execution, or delay for A period of time. 【 description 】 (1) when let robot motion, is to control the robot by the length of time the distance of the forward and backward, and the left and right rotation Angle. The specific value of time is the length of time, which can be accurate to milliseconds. The phrase PAUSE 1000 means that the delay time is set to 1 second. 3. The END of the statement (END) END format 】 【 【 features 】 terminates 4. Loop statement (FOR/NEXT) FOR loop variable = initial value TO the final STEP STEP length (...
... The circulatory body
... )
NEXT variable FOR loop statements (circular entrance) NEXT cycle final value statements (cycle export) 【 features 】 do statement used to perform a fixed number of repetitions. The initial value, final value, and step length of the loop variable can be constant or variable. When the STEP length is 1, STEP can be omitted. It is necessary to use the name of the loop variable. The nested layer of the loop is no more than 8 layers.
The SOUND (SOUND) [function] gives the SOUND of a given tone for the duration of the specified duration. The module has been integrated into port 10 of the general robot motherboard. Voice frequency value, is the actual frequency value, can send out the frequency of the peoples ears to hear, in the practical application, can be appropriately changing the frequency of the sound to correct intonation, sound frequency zero for the rest. Unconditional transfer statement (GOTO) (format) the GOTO mark (functio
显示全部