Difference between revisions of "S9 (language)/Using External Functions"

From Wiki**3

< S9 (language)
(New page: Exemplo da utilização das funções noutro ficheiro: <c> use int argc(); use string argv(int n); use int ackermann(int m, int n); use int getcnt(); public int s9() -> 0 { int m = 0; ...)
 
 
Line 18: Line 18:
 
</c>
 
</c>
  
[[category:Compilers]]
+
[[category:Compiladores]]
[[category:Teaching]]
+
[[category:Ensino]]

Latest revision as of 16:32, 6 April 2015

Exemplo da utilização das funções noutro ficheiro:

<c> use int argc(); use string argv(int n); use int ackermann(int m, int n); use int getcnt();

public int s9() -> 0 {

 int m = 0;
 int n = 0;
 "Teste para a função de Ackermann\n"!
 "Introduza M (<3): "! m = @;
 "Introduza N (<5): "! n = @;
 "Valor de ackermann("! m! ", "! n! "): "! ackermann(m, n)! "\n"!
 "Calls to ackermann: "! getcnt()! "\n"!

} </c>