Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Portugol Studio] Bibliotecas globais #11

Open
samuelrvg opened this issue Jan 27, 2024 · 1 comment
Open

[Portugol Studio] Bibliotecas globais #11

samuelrvg opened this issue Jan 27, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@samuelrvg
Copy link
Member

Implementar bibliotecas globais de Portugol Studio.

Usar documentação: https://dgadelha.github.io/Portugol-Webstudio/

  • Arquivos
  • Graficos
  • Matematica
  • Mouse
  • Sons
  • Teclado
  • Texto
  • Tipos
  • Util

Exemplos de uso:

programa
{
	inclua biblioteca Texto --> tx
	
	funcao inicio()
	{
		cadeia nome
		inteiro tamanho

		escreva("Digite seu nome: ")
		leia(nome)

		// Obtém o número de caracteres armazenados na variável
		tamanho = tx.numero_caracteres(nome)

		escreva("Seu nome possui ", tamanho, " caracteres\n")
		
	}
}
programa
{
	inclua biblioteca Util --> u
	
	funcao inicio()
	{
		para (inteiro contador = 10; contador >= 0; contador--)
		{
			limpa()
			escreva("Lançando o foguete em: ", contador)

			/* Faz com que o programa espere 1 segundo antes de fazer a próxima contagem.
			 *  
			 * O intervalo que o programa deve aguardar é informado sempre em milissegundos. 
			 * Como 1 segundo equivale a 1000 milissegundos, neste caso, informamos o valor 
			 * 1000.
			 * 
			 * Para fazer com que o programa aguarde apenas meio segundo, podemos informar o 
			 * valor 500, isto também fará com que a contagem seja mais rápida.
			 */
			u.aguarde(1000)
		}

		limpa()
		escreva("O foguete foi lançado!!\n")
	}
}

Pode ser quebrado em outras ISSUES, fiz esse resumo para ter referência e poder linkar depois.

@samuelrvg samuelrvg added the good first issue Good for newcomers label Jan 27, 2024
@leonelsanchesdasilva leonelsanchesdasilva changed the title [PORTUGOL STUDIO] Bibliotecas globais [Portugol Studio] Bibliotecas globais Jan 27, 2024
@leonelsanchesdasilva leonelsanchesdasilva transferred this issue from DesignLiquido/delegua Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants