Skip to content

Commit

Permalink
Corrigir funções maior_numero e menor_numero
Browse files Browse the repository at this point in the history
Closes #258
  • Loading branch information
dgadelha committed Jul 25, 2024
1 parent 703f93a commit 442fce4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 1 addition & 6 deletions packages/ide/src/app/tab-start/tab-start.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,9 @@

<section class="info">
<h4><svg-icon src="assets/mdi/newspaper.svg" svgAriaLabel="Ícone de jornal para notícias" />Novidades</h4>
<p><strong>24/07/2024:</strong> Correção nas funções <code>maior_numero</code> e <code>menor_numero</code> da biblioteca <code>Matematica</code></p>
<p><strong>02/05/2024:</strong> Portugol Webstudio como PWA: funcionamento offline</p>
<p><strong>01/05/2024:</strong> Correção de retorno em função vazia</p>
<p><strong>30/04/2024:</strong></p>
<ul>
<li>Melhorias de acessibilidade e ajustes na tela inicial e ícones</li>
<li>Correção nas verificações de erros relacionados a escopo e tipos</li>
<li>Melhorias na experiência de erros e de estabilidade no geral</li>
</ul>
</section>

<footer>
Expand Down
10 changes: 10 additions & 0 deletions packages/ide/src/app/tab-start/tab-start.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ section {
}
}

code {
font-family: "Lato", sans-serif;
font-size: 0.85rem;
border-radius: 0.25rem;
background-color: #2d2d2d;
color: #fff;
padding: 0.25rem 0.5rem;
margin: 0 0.25rem;
}

section.alert {
background: #8c2626;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/runtime/src/libs/Matematica.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ export default /* javascript */ `{
self.runtime.expectType("maior_numero", "numeroA", numeroA, "inteiro", "real");
self.runtime.expectType("maior_numero", "numeroB", numeroB, "inteiro", "real");
return new PortugolVar(self.runtime.assumeMathType(numero), Math.max(numeroA.value, numeroB.value));
return new PortugolVar(self.runtime.assumeMathType(numeroA, numeroB), Math.max(numeroA.value, numeroB.value));
},
menor_numero(numeroA, numeroB) {
self.runtime.expectType("menor_numero", "numeroA", numeroA, "inteiro", "real");
self.runtime.expectType("menor_numero", "numeroB", numeroB, "inteiro", "real");
return new PortugolVar(self.runtime.assumeMathType(numero), Math.min(numeroA.value, numeroB.value));
return new PortugolVar(self.runtime.assumeMathType(numeroA, numeroB), Math.min(numeroA.value, numeroB.value));
},
}`;

0 comments on commit 442fce4

Please sign in to comment.