Call a function: Difference between revisions
Content added Content deleted
(Call a function en True BASIC) |
(Call a function en BASIC256) |
||
Line 656: | Line 656: | ||
<lang axe>USER() |
<lang axe>USER() |
||
axeFunc()</lang> |
axeFunc()</lang> |
||
=={{header|BASIC256}}== |
|||
{{trans|FreeBASIC}} |
|||
<lang basic256>function Copialo$ (txt$, siNo, final$) |
|||
nuevaCadena$ = "" |
|||
for cont = 1 to siNo |
|||
nuevaCadena$ += txt$ |
|||
next cont |
|||
return trim(nuevaCadena$) + final$ |
|||
end function |
|||
subroutine Saludo() |
|||
print "Hola mundo!" |
|||
end subroutine |
|||
subroutine testCadenas (txt$) |
|||
for cont = 1 to length(txt$) |
|||
print mid(txt$, cont, 1); ""; |
|||
next cont |
|||
end subroutine |
|||
subroutine testNumeros (a, b, c) |
|||
print a, b, c |
|||
end subroutine |
|||
call Saludo() |
|||
print Copialo$("Saludos ", 6, "") |
|||
print Copialo$("Saludos ", 3, "!!") |
|||
print |
|||
call testNumeros(1, 2, 3) |
|||
call testNumeros(1, 2, 0) |
|||
print |
|||
call testCadenas("1, 2, 3, 4, cadena, 6, 7, 8, \#incluye texto\#") |
|||
end</lang> |
|||
{{out}} |
|||
<pre> |
|||
Igual que la entrada de FreeBASIC. |
|||
</pre> |
|||
=={{header|Batch File}}== |
=={{header|Batch File}}== |