Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fixed STRING variables or better say semi-variables
#2
You can fill them to capacity with MID$...

Code: (Select All)

Dim a As String * 8, b As String, c As String * 2, d As Integer
' initialization to a void/null string
Print "    a          c            b"
Print ">" + a + "<", ">" + c + "<", ">" + b + "<"

' filling the string variable
For d = 1 To 10
    Mid$(a, d, 1) = LTrim$(Str$(d))
    Mid$(c, d, 1) = LTrim$(Str$(d))
    b = b + LTrim$(Str$(d))
Next d
Print ">" + a + "<", ">" + c + "<", ">" + b + "<"
End

Pete

- I took an IQ test. The results show I 'm re-gifted.
Reply


Messages In This Thread
RE: Fixed STRING variables or better say semi-variables - by Pete - 12-15-2024, 08:09 AM



Users browsing this thread: 1 Guest(s)