comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How to remove a line of data from a file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
How to remove a line of data from a file [message #81965] Mon, 05 November 2012 13:34
panklbj is currently offline  panklbj
Messages: 5
Registered: November 2012
Junior Member
I have got two list, list A is a longer one which has got some non-repetitive numbers and list B is a shorter one which has got some numbers from list A(the numbers in list B are again non-repetitive). I mean what is contained in list B is also found in list A. Now I need to remove those numbers found in list B from list
A. If I want to do the opposite, it is easy, but I just don't know how to do it the other way around.

List A:
1
2
4
5
6
8
9
10
12
15
16

List B:
1
4
5
10
16

Here is the two for loops I use in order to extract those numbers found in list B from list A and write the numbers to another file, but I don't know how to write the numbers from list A which are NOT found in list B.(num1 is from list B and num is from list A)

for i=0,a-1 do begin

for j=0,b-1 do if (num1[j] ne num[i]) then printf,1,num[i],words[i],format="(I6,a10)" ;else printf,2,num[i],words[i],format="(I6,a10)"


endfor
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Finding pixel values of GeoTIFF image based on lat/lon (ENVI and IDL give different results).
Next Topic: Re: How to remove a line of data from a file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:09:34 PDT 2025

Total time taken to generate the page: 0.00507 seconds