Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

reading from a file

francisstokesfrancisstokes Member Posts: 43
i have a text file that contains 1 word. is there a way of putting that 1 word into a variable?
Sorry, i only started programming yesterday.

Comments

  • zibadianzibadian Member Posts: 6,349
    : i have a text file that contains 1 word. is there a way of putting that 1 word into a variable?
    : Sorry, i only started programming yesterday.
    :
    Yes. You can open a file using the Assign() and Reset() statements. Then you can use Readln() to read the word, and finally you need to close the file using Close(). The help files contain explanations on these routines, and also contain examples.
Sign In or Register to comment.