streams and loops can be used to do what you want, but maybe not in quite the same fashion as with QBasic. Streams have a variety of methods/operators to assist you.