pro example01 ;======================================================= ; Here is some code that will run under PV-WAVE or IDL ; that will create a BSCAN file named `filename.dat' with ; 10 empty records. ;======================================================= ; supply profile length prof_length=500 ; dimension data and header arrays header = fltarr(30) data = fltarr(prof_length) entire_record = fltarr(30+prof_length) ; open a file to write to openw,lun,'filename.dat',/get_lun record = assoc(lun,fltarr(30+prof_length)) ; loop through 10 records for rec_num=0,9 do begin ; fill header and data array here entire_record(0:29)=header entire_record(30:prof_length+29)=data ; next command actually writes the record to disk record(rec_num)=entire_record endfor ; close and free the logical unit number close,lun free_lun,lun return end