Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
32
Task/Call-a-function/FreeBASIC/call-a-function.basic
Normal file
32
Task/Call-a-function/FreeBASIC/call-a-function.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
Sub Saludo()
|
||||
Print "Hola mundo!"
|
||||
End Sub
|
||||
|
||||
Function Copialo(txt As String, siNo As Short, final As String = "") As String
|
||||
Dim nuevaCadena As String
|
||||
|
||||
For cont As Short = 1 To siNo
|
||||
nuevaCadena &= txt
|
||||
Next
|
||||
|
||||
Return Trim(nuevaCadena) & final
|
||||
End Function
|
||||
|
||||
Sub testNumeros(a As Integer, b As Integer, c As Integer = 0)
|
||||
Print a, b, c
|
||||
End Sub
|
||||
|
||||
Sub testCadenas(txt As String)
|
||||
For cont As Byte = 0 To Len(txt)
|
||||
Print Chr(txt[cont]); "";
|
||||
Next cont
|
||||
End Sub
|
||||
|
||||
Saludo
|
||||
Print Copialo("Saludos ", 6)
|
||||
Print Copialo("Saludos ", 3, "!!")
|
||||
?
|
||||
testNumeros(1, 2, 3)
|
||||
testNumeros(1, 2)
|
||||
?
|
||||
testCadenas("1, 2, 3, 4, cadena, 6, 7, 8, \'incluye texto\'")
|
||||
Loading…
Add table
Add a link
Reference in a new issue