Consola#
Introducción#
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.
imprimir#
The print block displays text in the console at the current row.
imprimir [VEXcode] ▶
Parámetros |
Descripción |
|---|---|
valor |
El texto, número o valor de variable que se mostrará. |
flecha expansiva |
Expande el bloque para leer y coloca el cursor en la siguiente fila para hacer que el cursor se mueva a la siguiente fila después de este bloque. |
Ejemplo
cuando empezó :: hat events
[Display a message in the console.]
imprimir [Hello, robot!] ▶
establecer la precisión de impresión#
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.
establecer la precisión de impresión a [0.1 v]
Parámetros |
Descripción |
|---|---|
precisión |
Establece la precisión de impresión en:
|
Ejemplo
cuando empezó :: hat events
[Display 1/3 with two decimals.]
establecer la precisión de impresión a [0.01 v]
imprimir ([1] [math_division v] [3]) ▶
borrar todas las filas#
The clear all rows block clears all rows from the console.
borrar todas las filas
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
cuando empezó :: hat events
[Clear the console after printing.]
imprimir [This will disappear...] ▶
esperar [2] segundos
borrar todas las filas
colocar el cursor en la siguiente fila#
The set cursor to next row block moves the cursor to column 1 on the next row in the console.
colocar el cursor en la siguiente fila
Parámetros |
Descripción |
|---|---|
Este bloque no tiene parámetros. |
Ejemplo
cuando empezó :: hat events
[Print on two rows.]
imprimir [Row 1] ▶
colocar el cursor en la siguiente fila
imprimir [Row 2] ▶
establecer el color de impresión#
The set print color block sets the print color used for displaying text in the console.
establecer color de impresión [negro v]
Parámetros |
Descripción |
|---|---|
color |
El texto de la consola de colores se mostrará en:
|
Ejemplo
cuando empezó :: hat events
[Print in different colors.]
imprimir [Default text color] ▶
colocar el cursor en la siguiente fila
establecer color de impresión [rojo v]
imprimir [Red text color] ▶