Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://hea-www.harvard.edu/PINTofALE/doc/PoA_StyleGuide.html
Дата изменения: Unknown Дата индексирования: Tue Oct 2 02:42:00 2012 Кодировка: Поисковые слова: http www.sai.msu.su sn sncat |
Last modified: March 10, 2008
Some rules of thumb that we follow when writing PINTofALE programs. None of these are mandatory (except the bit about documentation). But they represent wisdom harvested over years of frustrating missteps, so ignore them at your peril.
;+ ;procedure/function name ; description of program, including what it does, what it returns, and in what units ; ;syntax ; calling sequence, including all optional parameters and keywords, ; as well as keywords that are passed through to subroutines ; ;parameters ; par1 [INPUT]/[OUTPUT]/[I/O] description of parameter 1 ; ... ; parN [INPUT]/[OUTPUT]/[I/O] description of parameter N ; ;keywords ; key1 [INPUT]/[OUTPUT]/[I/O] description of keyword 1 ; ... ; key1 [INPUT]/[OUTPUT]/[I/O] description of keyword N ; verbose [INPUT] controls chatter ; _extra [INPUT ONLY] pass defined variables to subroutines ; * LIST of such keywords, if any ; ;restrictions ; requires subroutines: LIST ; other restrictions, if any ; ;description ; a brief description of the algorithm, how the program works ; ;example ; a typical worked example which can also serve for regression tests ; ;etymology ; why is the program named the way it is ; ;history ; who wrote it and when ; who modified it, when, and why ;-
for i=0,N do begin ;{here begins a for loop if A ne B then begin ;(is A ne B? case C of ;{checking on C opt1: begin ;( end ;) endcase ;C} endif else begin ;A.ne.B)(A=B while go_on do begin ;{for as long as go_on is going on endwhile ;GO_ON} endelse ;A=B) endfor ;I=0,N}
vv=0L & if keyword_set(verbose) then vv=long(verbose[0])>1
crlev=0.68 & if keyword_set(clev) then crlev=0.0+clev[0] if crlev lt 0 then crlev=abs(crlev) if crlev ge 1 and crlev lt 100 then crlev=crlev/100. if crlev ge 100 then crlev = 1.0D - 1.0D/crlev
if keyword_set(key1) then ikey1=1 else ikey1=0 if keyword_set(key2) then ikey2=1 else ikey2=0 if ikey2 then begin message,'KEY2 takes precedence over KEY1',/informational ikey1=0 endif ... if ikey1 then begin code corresponding to KEY1 endif if ikey2 then begin code corresponding to KEY2 endif