Console#
Introduction#
The VEXcode V5 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 the available 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 all rows on console – Clears all text from the Console.
set print precision on console – Adjusts numeric formatting for printed numbers.
set pen color on console – Changes the color of printed text.
print on console#
The print on console block displays text on the Console with the current font color.
imprimir [VEXcode] en la consola ▶
Parameters |
Description |
|---|---|
value |
The text, number, or variable value to display on the Console. |
expanding arrow |
Expand the block to say and set cursor to next row and make the cursor move to the next row after this block. |
Example
cuando empezó
[Display a message in the Console.]
imprimir [Hello, Robot!] en la consola ▶
set cursor to next row on console#
The set cursor to next row on console block moves the cursor to the next row on the Console.
Colocar el cursor en la siguiente fila de la consola
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Display two lines of text.]
imprimir [Line 1] en la consola ▶
Colocar el cursor en la siguiente fila de la consola
imprimir [Line 2] en la consola ▶
clear all rows on console#
The clear all rows on console block clears the Console of all text.
borrar todas las filas en la consola
Parameters |
Description |
|---|---|
This block has no parameters. |
Example
cuando empezó
[Clear a console message after 2 seconds.]
imprimir [Hello, Robot!] en la consola ▶
esperar [2] segundos
borrar todas las filas en la consola
set print precision on console#
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.
Establezca la precisión de impresión en [0.1 v] en la consola
Parameters |
Description |
|---|---|
precision |
Sets the print precision to:
|
Example
cuando empezó
[Print 1/3 as 0.33.]
Establezca la precisión de impresión en [0.01 v] en la consola
imprimir ([1] [math_division v] [3]) en la consola ▶
set pen color on console#
The set pen 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.
set pen color to [red v] on console
Parameter |
Description |
|---|---|
color |
The color to set: |
Example
cuando empezó
[Display a green message.]
set pen color to [green v] on console
imprimir [I am green!] en la consola ▶