02-24-2026, 05:13 AM
Of course if you do want to get the length of the text to match the length of the file...
Note that q is displayed as 123 but it's really a 10-character string. You can use _Trim$() to remove those Chr$(32) spaces.
Pete
Code: (Select All)
Open "crap" For Output As #1: Close #1
Dim q As String * 10
q = "123"
Open "crap" For Random As #1 Len = 10
Put #1, , q
Close #1
q = ""
Open "crap" For Random As #1 Len = 10
Get #1, , q
Close #1
Print "|" + q + "|"
End
Note that q is displayed as 123 but it's really a 10-character string. You can use _Trim$() to remove those Chr$(32) spaces.
Pete

