安慰#
介绍#
The VEXcode AIM Console is displayed in the Monitor window within VEXcode. It allows you to display text, receive input, and format printed data in real time.
Below is a list of all blocks:
print on console — Displays text at the current cursor position.
set cursor to next row on console — Moves the cursor to the next row.
clear console — Clears all text from the console.
ask and wait & answer — Prompts the user for input, then waits for a response to be entered in the console. The input can be used in the project.
set print precision on console — Adjusts numeric formatting for printed numbers.
set font color on console — Changes the color of printed text.
在控制台上打印#
print on console 块使用当前 字体颜色 在控制台上显示文本。
在控制台上打印 [VEXcode]▶
参数 |
描述 |
|---|---|
价值 |
要在控制台上显示的文本、数字或变量值。 |
扩大箭头 |
Expand the block to say and set cursor to next row to make the cursor move to the next row after this block. |
例子
当开始
[Display a message in the console.]
在控制台上打印 [Hello, Robot!]▶
将光标设置到控制台上的下一行#
The set cursor to next row on console block moves the cursor to the next row on the console.
在控制台上设定光标至下一行
参数 |
描述 |
|---|---|
该块没有参数。 |
例子
当开始
[Display two lines of text.]
在控制台上打印 [Line 1]▶
在控制台上设定光标至下一行
在控制台上打印 [Line 2]▶
清除控制台#
The clear console block clears the console of all text.
清除控制台
参数 |
描述 |
|---|---|
该块没有参数。 |
例子
当开始
[Clear a console message after 2 seconds.]
在控制台上打印 [Hello, Robot!]▶
等待 [2] 秒
清除控制台
询问、等待和回答#
The ask and wait and answer blocks are used together to prompt for an input from the console and then use the input in a project.
询问 [What's your name?] 并等待
范围 |
描述 |
|---|---|
迅速的 |
The prompt to display in the console. |
应答
answer 块没有参数。
例子
当开始
[Tell the robot your name.]
询问 [I'm AIM. What's your name?] 并等待
在控制台上打印 (应答)▶
在控制台上设置打印精度#
The set print precision on console block sets the precision formatting used for displaying numbers on the console. This print precision will apply to all subsequently printed numbers.
在控制台上设定打印精度为 [0.1 v]
参数 |
描述 |
|---|---|
精确 |
将打印精度设置为:
|
例子
当开始
[Print 1/3 as 0.33.]
在控制台上设定打印精度为 [0.01 v]
在控制台上打印 ([1] [math_division v] [3])▶
在控制台上设置字体颜色#
The set font color on console block changes the color of text displayed on the console. This affects all future printed text until the color is changed again.
设定控制台字体颜色为 [红色 v]
范围 |
描述 |
|---|---|
颜色 |
The color to set:
|
例子
当开始
[Display a green message.]
设定控制台字体颜色为 [绿色 v]
在控制台上打印 [I am green!]▶