39 lines
724 B
Plaintext
39 lines
724 B
Plaintext
Procedure Saludo()
|
|
PrintN("Hola mundo!")
|
|
EndProcedure
|
|
|
|
Procedure.s Copialo(txt.s, siNo.b, final.s = "")
|
|
Define nuevaCadena.s, resul.s
|
|
|
|
For cont.b = 1 To siNo
|
|
nuevaCadena + txt
|
|
Next
|
|
|
|
Resul = Trim(nuevaCadena) + final
|
|
|
|
ProcedureReturn resul
|
|
EndProcedure
|
|
|
|
Procedure testNumeros(a.i, b.i, c.i = 0)
|
|
PrintN(Str(a) + #TAB$ + Str(b) + #TAB$ + Str(c))
|
|
EndProcedure
|
|
|
|
Procedure testCadenas(txt.s)
|
|
For cont.b = 1 To Len(txt)
|
|
Print(Mid(txt,cont,1))
|
|
Next cont
|
|
EndProcedure
|
|
|
|
OpenConsole()
|
|
Saludo()
|
|
PrintN(Copialo("Saludos ", 6))
|
|
PrintN(Copialo("Saludos ", 3, "!!"))
|
|
PrintN("")
|
|
testNumeros(1, 2, 3)
|
|
testNumeros(1, 2)
|
|
PrintN("")
|
|
testCadenas("1, 2, 3, 4, cadena, 6, 7, 8, \'incluye texto\'")
|
|
|
|
Input()
|
|
CloseConsole()
|