This shows you the differences between two versions of the page.
es:call [2016/01/01 22:42] |
es:call [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Call (Comando) ===== | ||
+ | ==== Formato ==== | ||
+ | **call** subroutinename ( // | ||
+ | **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 ==== | ||
+ | |||
+ | < | ||
+ | # 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), | ||
+ | | ||
+ | end subroutine | ||
+ | </ | ||
+ | Dibujaría\\ | ||
+ | {{: | ||
+ | ==== Ver también ==== | ||
+ | {{page> | ||
+ | |||
+ | ==== Disponible desde la version ==== | ||
+ | 0.9.9.1 |