Jump to content

Hello world/Graphical: Difference between revisions

No edit summary
Line 3,089:
Wait for the escape key.
Shut down.</lang>
 
=={{header|Portugol}}==
<lang Portugol>
programa {
// includes graphics library and use an alias
inclua biblioteca Graficos --> g
 
// define WIDTH and HEIGHT integer constants
const inteiro WIDTH = 200
const inteiro HEIGHT = 100
 
// main entry
funcao inicio() {
// begin graphical mode (verdadeiro = true)
g.iniciar_modo_grafico(verdadeiro)
 
// define window title
g.definir_titulo_janela("Hello")
// define window dimesions
g.definir_dimensoes_janela(WIDTH, HEIGHT)
 
// while loop
enquanto (verdadeiro) {
// define color to black(preto) and clear window
g.definir_cor(g.COR_PRETO)
g.limpar()
 
// define color to white(branco)
g.definir_cor(g.COR_BRANCO)
// set text font size
g.definir_tamanho_texto(32.0)
// draws text
g.desenhar_texto(0, HEIGHT / 3, "Hello, world!")
// calls render function
g.renderizar()
}
 
// end graphical mode
g.encerrar_modo_grafico()
}
}
 
</lang>
 
=={{header|PostScript}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.