Syntax error while compiling IDL code [message #38877] |
Wed, 07 April 2004 12:20 |
guptaparesh7
Messages: 3 Registered: April 2004
|
Junior Member |
|
|
Hello Everyone,
When I try to compile the following .pro file using IDL 6.0, I get
a syntax error message given below.
------------------------------------------------------------ --------------
IDL> .compile approach
dmazid=map_2points(elk(k),nlk(k),elz(j),nlz(j),/METERS)
^
% Syntax error.
At: /disk/151/oracle/j2ee/home/default-web-app/WEB-INF/classes/F DOIclasses/IDLCode/windmodel/GEMPLEX_04_01_04/MODULES_VM/app roach.pro,
Line 17
% 1 Compilation error(s) in module APPROACH.
IDL>
------------------------------------------------------------ ---------------
---------------------------------------------------------
PRO APPROACH,k,elk,nlk,elz,nlz,range,zpstc
compile_opt hidden
on_error,1
;...preamble
if n_params() eq 0 then begin
print,'APPROACHX,k,elk,nlk,elz,nlz,range,zpstc'
return&endif
;...collect zipcodes which are within range of current center
kinc=1 & k=-kinc & nzip=n_elements(elz)
labela: k=k+kinc & dc2zip=1000.
if k+1 gt n_elements(elk) then return
;...build table of distances of all zipcodes from current center
for j=0,nzip-1 do begin
;*********************************************************
; this is where I am getting the error message...
dmazid=map_2points(elk(k),nlk(k),elz(j),nlz(j),/METERS)
;*********************************************************
dc2zip=[dc2zip,1e-3*dmazid(0)] &endfor & dc2zip=dc2zip(1:*)
;...select only those zipcodes within range of the storm center
izip=where(dc2zip le range,ict) & if ict eq 0 then goto,labela
;...for each center fix collect effected zipcodes in structure
zpstc={index:k,jndice:izip,elz:elz(izip),nlz:nlz(izip)}
END ;APPROACH.PRO
---------------------------------------------------------
Any kind of help would be appreciated.
I am a complete novice to IDL.
Thanks!
|
|
|