User Tools

Site Tools


es:call

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

es:call [2016/01/01 22:42]
es:call [2020/02/28 10:46] (current)
Line 1: Line 1:
 +===== Call (Comando) =====
  
 +==== Formato ====
 +**call** subroutinename ( //expr_list// )\\
 +**call** subroutinename\\
 +
 +==== Descripción ====
 +Este comando se utiliza para realizar una llamada a una subrutina, definida en alguna parte del programa. Se pueden pasar parámetros a la misma.
 +==== Ejemplo ====
 +
 +<code>
 +# 100 random circles
 +clg
 +for x = 1 to 100
 +   call draw()
 +next x
 +end
 +
 +function rnd(n)
 +   rnd = int(rand*n)
 +end function
 +
 +subroutine draw()
 +   color rnd(256),rnd(256),rnd(256)
 +   circle rnd(graphwidth), rnd(graphheight), rnd(graphwidth/10)
 +end subroutine
 +</code>
 +Dibujaría\\
 +{{:en:subroutine_circle.png|Circles}}
 +==== Ver también ====
 +{{page>en:start#Program Control&noheader}}
 +
 +==== Disponible desde la version ==== 
 +0.9.9.1
es/call.txt · Last modified: 2020/02/28 10:46 (external edit)