Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
31
Task/Call-a-function/True-BASIC/call-a-function.basic
Normal file
31
Task/Call-a-function/True-BASIC/call-a-function.basic
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FUNCTION Copialo$ (txt$, siNo, final$)
|
||||
FOR cont = 1 TO ROUND(siNo)
|
||||
LET nuevaCadena$ = nuevaCadena$ & txt$
|
||||
NEXT cont
|
||||
|
||||
LET Copialo$ = LTRIM$(RTRIM$(nuevaCadena$)) & final$
|
||||
END FUNCTION
|
||||
|
||||
SUB Saludo
|
||||
PRINT "Hola mundo!"
|
||||
END SUB
|
||||
|
||||
SUB testCadenas (txt$)
|
||||
FOR cont = 1 TO ROUND(LEN(txt$))
|
||||
PRINT (txt$)[cont:cont+1-1]; "";
|
||||
NEXT cont
|
||||
END SUB
|
||||
|
||||
SUB testNumeros (a, b, c)
|
||||
PRINT a, b, c
|
||||
END SUB
|
||||
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue