Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - When using IDL to read the data in the *.txt file, why does it start reading from line 2? Can it be modified?
When using IDL to read the data in the *.txt file, why does it start reading from line 2? Can it be modified?

temp=''

readf,lun,temp

These two lines, located at the beginning of the program, use a string variable to read the file the first line of. Typically, this is used to skip the header of a file.

It is estimated that when this program was designed, the txt file had something similar to a table header. This is why if you add an arbitrary character to the first line, the program will be correct.

If you delete these two lines of code, you don’t need to add any characters!