: TO RUN THIS FILE -> TYPE: @ 1-30-08.pro ; AT THE IDL PROMPT ; ; ; ; IDL Version 6.3 (linux x86 m32) ; Journal File for phiggins@phobos ; Working directory: /home/phiggins/public_html/idl_decal ; Date: Sun Feb 3 14:46:24 2008 ;OPERATORS print,123+65453 ; 65576 print,float(123+65453) ; 65576.0 print,float(123-65453) ; -65330.0 print,123/65453 ; 0 print,123/65453. ; 0.00187921 print,34^32 ; 0 print,34D^32 ; 1.0170103e+49 ;STRINGS print,'Hello, word!' ;Hello, word! print,23849 ; 23849 print,string(23849) ; 23849 print,strcompress(23849,/remo) ;23849 x=blah ; % Variable is undefined: BLAH. x='blah' y='lalalala' print,x+y ;blahlalalala print,x-y ; % Operation illegal with strings. x='hello_my_name_is_Paul_.' print,x ;hello_my_name_is_Paul_. y=strsplit(x,'_',/extract) print,y ;hello my name is Paul . help,y z=strjoin(y,' ') print,z ;hello my name is Paul . help,z ;LOOPS x=0 for i=0,10 do x=x+1 print,x ; 11 for i=0,10 do begin & x=x+1 & print,x & endif ; % Type of end does not match statement (ENDFOR expected). for i=0,10 do begin & x=x+1 & print,x & endfor ; 12 ; 13 ; 14 ; 15 ; 16 ; 17 ; 18 ; 19 ; 20 ; 21 ; 22 x=0 while x lt 10 x=x+1 ; % Syntax error. while x lt 10 then x=x+1 ; % Syntax error. while x lt 10 do x=x+1 print,x ; 10 while x le 10 do x=x+1 print,x ; 11 while x le 10 do x=x+2 print,x ; 11 while x lt 10 do x=x+2 print,x ; 11 ;LOGIC x=3 print,x gt 5 ; 0 print,x lt 5 ; 1 if x gt 5 then print,'hello' else print,'goodbye' ;goodbye if x lt 5 then print,'hello' else print,'goodbye' ;hello print,3>5 ; 5 print,3<5 ; 3