安慰#
介绍#
The VEXcode GO Console is displayed in the Monitor window within VEXcode. It allows you to display text and format printed data in real time.
Below is a list of all blocks:
print — Prints a value or text to the console.
set print precision — Sets how many decimal places to show.
clear all rows — Clears all rows in the console.
set cursor to next row — Moves the cursor to the next row.
set print color — Sets the color used for text.
打印#
The print block displays text in the console at the current row.
打印 [VEXcode] ▶
参数 |
描述 |
|---|---|
价值 |
要显示的文本、数字或变量值。 |
扩大箭头 |
展开块以读取并将光标设置到下一行,以使光标移动到该块之后的下一行。 |
例子
当开始 :: hat events
[Display a message in the console.]
打印 [Hello, robot!] ▶
设置打印精度#
The set print precision block sets the number of decimal places shown when displaying numbers in the console. This print precision will apply to all subsequently printed numbers.
设定打印精度为 [0.1 v]
参数 |
描述 |
|---|---|
精确 |
将打印精度设置为:
|
例子
当开始 :: hat events
[Display 1/3 with two decimals.]
设定打印精度为 [0.01 v]
打印 ([1] [math_division v] [3]) ▶
清除所有行#
The clear all rows block clears all rows from the console.
清除所有行
参数 |
描述 |
|---|---|
该块没有参数。 |
例子
当开始 :: hat events
[Clear the console after printing.]
打印 [This will disappear...] ▶
等待 [2] 秒
清除所有行
将光标设置到下一行#
The set cursor to next row block moves the cursor to column 1 on the next row in the console.
设定光标至下一行
参数 |
描述 |
|---|---|
该块没有参数。 |
例子
当开始 :: hat events
[Print on two rows.]
打印 [Row 1] ▶
设定光标至下一行
打印 [Row 2] ▶
设置打印颜色#
The set print color block sets the print color used for displaying text in the console.
设定打印颜色为 [black v]
参数 |
描述 |
|---|---|
颜色 |
彩色控制台文本将显示为:
|
例子
当开始 :: hat events
[Print in different colors.]
打印 [Default text color] ▶
设定光标至下一行
设定打印颜色为 [红色 v]
打印 [Red text color] ▶