Consola#
Introducción#
The IQ (2nd gen) Console appears in the Monitor window and displays text output from your project. In other environments like VS Code, printf will display text on the terminal. New projects begin with the cursor at row 1.
Below is a list of all methods:
Acciones: Mostrar texto o borrar la consola.
printf— Print text to the console.Clear Print Console — Clear all text from the console.
Comportamiento#
printf#
printf prints text on the screen using the current cursor position.
Nota: El texto no se enviará a la consola hasta que se inicie una nueva línea.
Usage:
printf(value)
Parámetros |
Descripción |
|---|---|
|
La cadena (entre comillas) o números enteros que se imprimirán en la Consola de impresión. |
// Print a message to the console
printf("Hello, robot!");
printf("\n");
Clear Print Console#
By printing \033[2J, everything inside the Console will be cleared.
Usage:
printf(“\033[2J\n”)
// Print to the console, then clear it after
// 2 seconds
printf("VEXcode");
wait(2, seconds);
printf("\033[2J\n");