Como limpar a tela do terminal?
Pessoal,
É possível em modo CLI (prompt de comando) apagar a tela? Tentei usar CLS dentro do script .bas, mas não funcionou. Fiquei surpreso com o poder do SmalBASIC, quando comparado a outras versões de BASIC. Obrigado! At.te,
Luiz
The CLI version of SmallBASIC (sbasic or sbasic.exe) supports in Linux and newer Windows versions (some win10 and win11) ANSI escape codes. I tested the following example in win11 using terminal as CLI.
' https://en.wikipedia.org/wiki/ANSI_escape_code
print "\e[31mTest1\e[0m" ' Test1 in red
print "\e[2J" ' Clear screen
print "\e[0;0H" ' Cursor to 0,0 (top/left)
print "\e[31mTest2\e[0m" ' Test2 in red, only this should be visible
Obrigado! Em segunda-feira, 10 de março de 2025 às 07:29:18 BRT, Joerg Siebenmorgen @.***> escreveu:
The CLI version of SmallBASIC (sbasic or sbasic.exe) supports in Linux and newer Windows versions (some win10 and win11) ANSI escape codes. I tested the following example in win11 using terminal as CLI. ' https://en.wikipedia.org/wiki/ANSI_escape_code
print "\e[31mTest1\e[0m" ' Test1 in red
print "\e[2J" ' Clear screen print "\e[0;0H" ' Cursor to 0,0 (top/left)
print "\e[31mTest2\e[0m" ' Test2 in red, only this should be visible
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***> Joe7M left a comment (smallbasic/SmallBASIC#238) The CLI version of SmallBASIC (sbasic or sbasic.exe) supports in Linux and newer Windows versions (some win10 and win11) ANSI escape codes. I tested the following example in win11 using terminal as CLI. ' https://en.wikipedia.org/wiki/ANSI_escape_code
print "\e[31mTest1\e[0m" ' Test1 in red
print "\e[2J" ' Clear screen print "\e[0;0H" ' Cursor to 0,0 (top/left)
print "\e[31mTest2\e[0m" ' Test2 in red, only this should be visible
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
| | Não contém vírus.www.avg.com |