07-10-2023, 04:47 PM
Example of connecting two string constants in the main program and a function (procedure works the same way).
Code: (Select All)
'Beispiel fuer Nutzung einer Konstanten in einer Funktion(Prozedur) - 10. Juli 2023
Option _Explicit
Declare Function satzErgaenzen(satz As String) as String
Const Stanislaw = "His conscience was clear, "
Locate 2, 3
Print "Konstanten verbinden in Hauptprogramm und Funktion"
Locate 3, 3
Print "=================================================="
Locate 5, 3
Print satzErgaenzen(Stanislaw)
End
Function satzErgaenzen$ (Stanislaw As String)
Const Ergaenzen = "he never used it! -- Stanislaw Jerzy Lec"
Stanislaw = Stanislaw + Ergaenzen
satzErgaenzen = Stanislaw
End Function