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.
A continuación se muestra una lista de todos los métodos disponibles:
Acciones: Mostrar texto o borrar la consola.
printf
– Print text to the console.Borrar consola de impresión – Borra el texto de la consola.
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 using \033[2J
inside of the printf
command, you can clear the entire Print Console.
Usage:
printf(“\033[2J\n”)
// Print to the console, then clear it after
// 2 seconds
printf("VEXcode");
wait(2, seconds);
printf("\033[2J\n");