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

Home » Public Forums » archive » Having problems with the modulo operator
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
Having problems with the modulo operator [message #33090] Wed, 04 December 2002 21:47
doyle is currently offline  doyle
Messages: 6
Registered: April 2002
Junior Member
Hi everyone,
I'm having an annoying problem. My program is skipping over a loop
that I have. Specifically it's skipping over the if bit of my code.
I pasted what I have at the bottom of the message. The while runs
just fine but when I get down to the eleventh line of the code it just
keeps on running. What am I doing wrong? I've tried the 0 mod 4 bit
with and without parens.

Thanks in advance

Nate

i=1
new=replicate(data_comp_struct,200)
line=' '
linearr=[' ']
while not EOF(lun) do begin
readf,lun,line
line=strcompress(line)
line=strmid(line,strpos(line,'{ ')+1,strlen(line)-1)
linearr=[linearr,strsplit(line,/extract)]
if linearr[1] eq '{' then linearr=linearr[2:*]
if i eq (0 mod 4) then begin
for j=0,n_elements(linearr)-1 do begin
linearr=linearr[1:*]
exp_time_correct,linearr
data_comp_struct.(j)=linearr[j]
new[i/4]=data_comp_struct
print,new[0]
data_comp_struct=reset
linearr=[' ']
endfor
end
i=i+1
endwhile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: calling IDL from outside (Python or shell)
Next Topic: builtin simplex?

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

Current Time: Thu Oct 09 21:26:28 PDT 2025

Total time taken to generate the page: 0.24287 seconds