Console#

Introduction#

The VEXcode IQ 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 the available blocks for interacting with the console:

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.

set cursor to next row stack block#
Colocar el cursor en la siguiente fila de la consola

Parameters

Description

This block has no parameters.

Example

When started, prints ‘Line 1’ on the console, moves the cursor to the next row, and then prints ‘Line 2’.#
cuando empezó :: hat events
[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 console#

The clear console block clears the Console of all text.

clear console block#
clear all rows on console

Parameters

Description

This block has no parameters.

Example

cuando empezó :: hat events
[Clear a console message after 2 seconds.]
imprimir [Hello, Robot!] en la consola ▶
esperar [2] segundos
clear all rows on console

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.

set print precision stack block#
Establezca la precisión de impresión en [0.1 v] en la consola

Parameters

Description

precision

Sets the print precision to:

  • 1
  • 0.1
  • 0.01
  • 0.001
  • All Digits

Example

When started, sets print precision to two decimal places and prints 1/3 as 0.33 on the console.#
cuando empezó :: hat events
[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 font color on console#

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.

The set font color stack block.#
Establezca el color de fuente a [rojo v] en la consola

Parameter

Description

color

The color to set:
red, green, blue, black, white, yellow, orange, purple, red violet, violet,blue violet,blue green,yellow green,yellow orange,red orange.

Example

cuando empezó :: hat events
[Display a green message.]
Establezca el color de fuente a [verde v] en la consola
imprimir [I am green!] en la consola ▶