View previous topic :: View next topic |
Author |
Message |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Thu Jun 10, 2021 3:14 pm Post subject: read a joke from a file |
|
|
What would be the best way to read a joke from a txt file like this
Code: |
"joke 1 here and so on
joke1 still here and heeeeeereee
joke 1 ends here"
"joke2 starts here, and continues...
still here too!
and ends here..."
|
possible to use " " to specify the start and end of a line? or what would be the best way, thanks in advanced  _________________ ComputerTech |
|
Back to top |
|
 |
ComputerTech Master

Joined: 22 Feb 2020 Posts: 393
|
Posted: Thu Jun 10, 2021 4:58 pm Post subject: |
|
|
Nevermind, Thanks to DasBrain, i found what i needed.
Here's my code:
Code: |
inside jokes.txt
"joke 1 here
still here
ending here"
joke2 here
still here
ending here"
set fd "scripts/jokes.txt"
set jokes [read $fd]
|
_________________ ComputerTech |
|
Back to top |
|
 |
|