XPLOR-NIH version 2.19.1 C.D. Schwieters, J.J. Kuszewski, Progr. NMR Spectr. 48, 47-62 (2006). N. Tjandra, and G.M. Clore J. Magn. Res., 160, 66-74 (2003). http://nmr.cit.nih.gov/xplor-nih based on X-PLOR 3.851 by A.T. Brunger User: schwitrs on: mustard (x86_64/Linux ) at: 5-Feb-08 10:47:49 X-PLOR>remarks parsertest.inp X-PLOR>remarks X-PLOR>remarks test X-PLOR parser X-PLOR>remarks Axel T. Brunger X-PLOR> X-PLOR>set message=all end X-PLOR> X-PLOR>evaluate( $1 = 3.0 ) EVALUATE: symbol $1 set to 3.00000 (real) X-PLOR>evaluate( $2 = 4.0 ) EVALUATE: symbol $2 set to 4.00000 (real) X-PLOR> X-PLOR>{* if statements *} X-PLOR>{* ============= *} X-PLOR> X-PLOR>if ( $1 = 2.0 ) then NEXTCD: condition evaluated as false X-PLOR> display ERROR !!!! X-PLOR> parameter X-PLOR> nbonds end X-PLOR> end X-PLOR>elseif ( $2 = 4.0 ) then NEXTCD: condition evaluated as true X-PLOR> if ( $1 = 3 ) then NEXTCD: condition evaluated as true X-PLOR> display OK !! OK !! X-PLOR> if ( $1 = 2 ) then NEXTCD: condition evaluated as false X-PLOR> display ERROR !!!! X-PLOR> end if X-PLOR> else X-PLOR> minimize powell end X-PLOR> display ERROR !!!! X-PLOR> dynamics verlet end X-PLOR> end if X-PLOR>else X-PLOR> display ERROR !!!! X-PLOR>end if X-PLOR> X-PLOR>evaluate ($1=-3) EVALUATE: symbol $1 set to -3.00000 (real) X-PLOR>if ($1 = -3 ) then NEXTCD: condition evaluated as true X-PLOR> display ok !!! ok !!! X-PLOR>end if X-PLOR>evaluate ($1=3) EVALUATE: symbol $1 set to 3.00000 (real) X-PLOR>if ($1 = +3 ) then NEXTCD: condition evaluated as true X-PLOR> display ok !!! ok !!! X-PLOR>end if X-PLOR> X-PLOR>if (1=1.000) then NEXTCD: condition evaluated as true X-PLOR> display ok !! ok !! X-PLOR>end if X-PLOR> X-PLOR>if (1> 1.00E00) then NEXTCD: condition evaluated as false X-PLOR> display no !! X-PLOR>end if X-PLOR> X-PLOR>if (1 < $1) then NEXTCD: condition evaluated as true X-PLOR> display OK !! OK !! X-PLOR>end if X-PLOR> X-PLOR>if (a=b) then NEXTCD: condition evaluated as false X-PLOR> display no !! X-PLOR>end if X-PLOR> X-PLOR>if (a=a) then NEXTCD: condition evaluated as true X-PLOR> display ok !! ok !! X-PLOR>end if X-PLOR> X-PLOR>if (a="A") then NEXTCD: condition evaluated as true X-PLOR> display ok !! ok !! X-PLOR>end if X-PLOR> X-PLOR>eval ($rr="a") EVALUATE: symbol $RR set to "a" (string) X-PLOR>if ($rr="a") then NEXTCD: condition evaluated as true X-PLOR> display ok!! ok!! X-PLOR>end if X-PLOR> X-PLOR>if ("a"=$rr) then NEXTCD: condition evaluated as true X-PLOR> display ok !! ok !! X-PLOR>end if X-PLOR> X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main FOR LOOP: symbol 1 set to 1.00000 (real) X-PLOR> display $1 1 X-PLOR>end loop main X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main FOR LOOP: symbol 1 set to -1.00000 (real) X-PLOR> display $1 -1 X-PLOR>end loop main X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main FOR LOOP: symbol 1 set to 2.00000 (real) X-PLOR> display $1 2 X-PLOR>end loop main X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main FOR LOOP: symbol 1 set to -0.300000E-09 (real) X-PLOR> display $1 -3E-10 X-PLOR>end loop main X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main FOR LOOP: symbol 1 set to 5.00000 (real) X-PLOR> display $1 5 X-PLOR>end loop main X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main FOR LOOP: symbol 1 set to 0.600000 (real) X-PLOR> display $1 0.6 X-PLOR>end loop main X-PLOR>for $1 in ( 1 -1 2. -3.e-10 +5 +.6 ) loop main X-PLOR> display $1 X-PLOR>end loop main X-PLOR> X-PLOR>evaluate ($1="a") EVALUATE: symbol $1 set to "a" (string) X-PLOR>if ($1="b") then NEXTCD: condition evaluated as false X-PLOR> for $1 in ( a b c d ) loop main X-PLOR> dynamics verlet end X-PLOR> end loop main X-PLOR>elseif ($1="c") then NEXTCD: condition evaluated as false X-PLOR> for $1 in ( a b c d ) loop main X-PLOR> dynamics verlet end X-PLOR> end loop main X-PLOR>elseif ($1="a") then NEXTCD: condition evaluated as true X-PLOR> for $1 in ( a b c d ) loop main Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) X-PLOR> end loop main X-PLOR> for $1 in ( a b c d ) loop main Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) X-PLOR> end loop main X-PLOR> for $1 in ( a b c d ) loop main Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) X-PLOR> end loop main X-PLOR> for $1 in ( a b c d ) loop main Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) X-PLOR> end loop main X-PLOR> for $1 in ( a b c d ) loop main X-PLOR> end loop main X-PLOR>elseif ($1="q") then NEXTCD: condition evaluated as false X-PLOR> for $1 in ( a b c d ) loop main X-PLOR> dynamics verlet end X-PLOR> end loop main X-PLOR>end if X-PLOR> X-PLOR>{* basic loop with exit statement *} X-PLOR>{* ============================== *} X-PLOR> X-PLOR>for $a in ( 1 2 3 ) loop main FOR LOOP: symbol A set to 1.00000 (real) X-PLOR> evaluate( $1 = 1 ) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 1 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 2.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 2 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 3.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 3 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 4.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 4 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 5 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 6.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as true X-PLOR> end loop test X-PLOR> display YEAH!!! $a $1 YEAH!!! 1 6 X-PLOR>end loop main X-PLOR>for $a in ( 1 2 3 ) loop main FOR LOOP: symbol A set to 2.00000 (real) X-PLOR> evaluate( $1 = 1 ) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 1 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 2.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 2 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 3.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 3 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 4.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 4 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 5 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 6.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as true X-PLOR> end loop test X-PLOR> display YEAH!!! $a $1 YEAH!!! 2 6 X-PLOR>end loop main X-PLOR>for $a in ( 1 2 3 ) loop main FOR LOOP: symbol A set to 3.00000 (real) X-PLOR> evaluate( $1 = 1 ) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 1 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 2.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 2 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 3.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 3 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 4.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 4 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> end loop test X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 5 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 6.00000 (real) X-PLOR> if ( $1 > 5 ) then exit test end if NEXTCD: condition evaluated as true X-PLOR> end loop test X-PLOR> display YEAH!!! $a $1 YEAH!!! 3 6 X-PLOR>end loop main X-PLOR>for $a in ( 1 2 3 ) loop main X-PLOR> evaluate( $1 = 1 ) X-PLOR> loop test X-PLOR> display LOOP-INDEX= $1 X-PLOR> evaluate( $1 = $1 + 1 ) X-PLOR> if ( $1 > 5 ) then exit test end if X-PLOR> end loop test X-PLOR> display YEAH!!! $a $1 X-PLOR>end loop main X-PLOR> X-PLOR> X-PLOR>{* while loop *} X-PLOR>{* ========== *} X-PLOR>evaluate( $1 = 1 ) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR> X-PLOR>while ( $1 <= 5 ) loop test NEXTCD: condition evaluated as true X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 1 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 2.00000 (real) X-PLOR> parameter end X-PLOR>end loop test X-PLOR>while ( $1 <= 5 ) loop test NEXTCD: condition evaluated as true X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 2 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 3.00000 (real) X-PLOR> parameter end X-PLOR>end loop test X-PLOR>while ( $1 <= 5 ) loop test NEXTCD: condition evaluated as true X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 3 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 4.00000 (real) X-PLOR> parameter end X-PLOR>end loop test X-PLOR>while ( $1 <= 5 ) loop test NEXTCD: condition evaluated as true X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 4 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR> parameter end X-PLOR>end loop test X-PLOR>while ( $1 <= 5 ) loop test NEXTCD: condition evaluated as true X-PLOR> display LOOP-INDEX= $1 LOOP-INDEX= 5 X-PLOR> evaluate( $1 = $1 + 1 ) EVALUATE: symbol $1 set to 6.00000 (real) X-PLOR> parameter end X-PLOR>end loop test X-PLOR>while ( $1 <= 5 ) loop test NEXTCD: condition evaluated as false X-PLOR> display LOOP-INDEX= $1 X-PLOR> evaluate( $1 = $1 + 1 ) X-PLOR> parameter end X-PLOR>end loop test X-PLOR> X-PLOR> X-PLOR>{* for loop *} X-PLOR>{* ======== *} X-PLOR> X-PLOR>for $1 in ( A B C D E ) loop test Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) X-PLOR> display LOOP-COUNTER= $1 LOOP-COUNTER= A X-PLOR>end loop test X-PLOR>for $1 in ( A B C D E ) loop test Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) X-PLOR> display LOOP-COUNTER= $1 LOOP-COUNTER= B X-PLOR>end loop test X-PLOR>for $1 in ( A B C D E ) loop test Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) X-PLOR> display LOOP-COUNTER= $1 LOOP-COUNTER= C X-PLOR>end loop test X-PLOR>for $1 in ( A B C D E ) loop test Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) X-PLOR> display LOOP-COUNTER= $1 LOOP-COUNTER= D X-PLOR>end loop test X-PLOR>for $1 in ( A B C D E ) loop test Assuming literal string "E" FOR LOOP: symbol 1 set to "E" (string) X-PLOR> display LOOP-COUNTER= $1 LOOP-COUNTER= E X-PLOR>end loop test X-PLOR>for $1 in ( A B C D E ) loop test X-PLOR> display LOOP-COUNTER= $1 X-PLOR>end loop test X-PLOR> X-PLOR> X-PLOR>{* nested loops *} X-PLOR>{* ============ *} X-PLOR> X-PLOR>for $1 in (A B C D E) loop test Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 1.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= A LOOP-SUB-INDEX= 1 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 2.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= A LOOP-SUB-INDEX= 2 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= A LOOP-SUB-INDEX= 3 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 X-PLOR> if ( $1 eq E ) then exit test end if X-PLOR> parameter end X-PLOR> end loop sub X-PLOR>end loop test X-PLOR>for $1 in (A B C D E) loop test Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 1.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= B LOOP-SUB-INDEX= 1 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 2.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= B LOOP-SUB-INDEX= 2 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= B LOOP-SUB-INDEX= 3 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 X-PLOR> if ( $1 eq E ) then exit test end if X-PLOR> parameter end X-PLOR> end loop sub X-PLOR>end loop test X-PLOR>for $1 in (A B C D E) loop test Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 1.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= C LOOP-SUB-INDEX= 1 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 2.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= C LOOP-SUB-INDEX= 2 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= C LOOP-SUB-INDEX= 3 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 X-PLOR> if ( $1 eq E ) then exit test end if X-PLOR> parameter end X-PLOR> end loop sub X-PLOR>end loop test X-PLOR>for $1 in (A B C D E) loop test Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 1.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= D LOOP-SUB-INDEX= 1 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 2.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= D LOOP-SUB-INDEX= 2 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= D LOOP-SUB-INDEX= 3 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as false X-PLOR> parameter end X-PLOR> end loop sub X-PLOR> for $2 in ( 1 2 3 ) loop sub X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 X-PLOR> if ( $1 eq E ) then exit test end if X-PLOR> parameter end X-PLOR> end loop sub X-PLOR>end loop test X-PLOR>for $1 in (A B C D E) loop test Assuming literal string "E" FOR LOOP: symbol 1 set to "E" (string) X-PLOR> for $2 in ( 1 2 3 ) loop sub FOR LOOP: symbol 2 set to 1.00000 (real) X-PLOR> display LOOP-TEST-INDEX= $1 LOOP-SUB-INDEX= $2 LOOP-TEST-INDEX= E LOOP-SUB-INDEX= 1 X-PLOR> if ( $1 eq E ) then exit test end if NEXTCD: condition evaluated as true X-PLOR> parameter end X-PLOR> end loop sub X-PLOR>end loop test X-PLOR> X-PLOR> X-PLOR> X-PLOR> X-PLOR>{* test some system symbols *} X-PLOR>{* ======================== *} X-PLOR> X-PLOR>display $CPU $NAME $SYSTEM 4E-02 schwitrs x86_64/Linux X-PLOR>display $KBOLTZ $PI $TIMFAC 1.987191E-03 3.14159 4.888821E-02 X-PLOR>display $TIME $DATE 10:47:49 5-Feb-08 X-PLOR> X-PLOR>{* test continuation *} X-PLOR>evaluate ($1a=123.46) EVALUATE: symbol $1A set to 123.460 (real) X-PLOR>evaluate ($2a=10.03) EVALUATE: symbol $2A set to 10.0300 (real) X-PLOR>display $1a\ testing $2a[F10.4]\ abcdefghijklmnop \ test 123.46testing 10.0300abcdefghijklmnop test X-PLOR> X-PLOR>display $1a\ $1a[F6.2],$2a[F8.2] 123.46123.46, 10.03 X-PLOR> X-PLOR> X-PLOR>rtf RTFRDR> ! RTFRDR> mass A 1.0 RTFRDR> mass B 2.0 RTFRDR> mass C 3.0 RTFRDR> mass D 4.0 RTFRDR> mass E 5.0 RTFRDR> mass F 6.0 RTFRDR> mass G 7.0 RTFRDR> mass H 8.0 RTFRDR> mass I 9.0 RTFRDR> ! RTFRDR> residue test RESIDUE> atom A type A charge 10.0 end RESIDUE> atom B type B charge 20.0 end RESIDUE> atom C type C charge 30.0 end RESIDUE> atom D type D charge 40.0 end RESIDUE> atom E type E charge 50.0 end RESIDUE> atom F type F charge 60.0 end RESIDUE> atom G type G charge 70.0 end RESIDUE> atom H type H charge 80.0 end RESIDUE> atom I type I charge 90.0 end RESIDUE> end RTFRDR> ! RTFRDR>end !RTF X-PLOR> X-PLOR>segment SEGMENT> name=test SEGMENT> molecule name=test number=1 end SEGMNT: 1 TEST molecules have been added to segment "TEST" SEGMENT>end SEGMNT: 1 residues were inserted into segment "TEST" XPLOR: current counts (number in parenthesis is maximum) NATOM= 9(MAXA= 200) NBOND= 0(MAXB= 0) NTHETA= 0(MAXT= 0) NGRP= 1(MAXGRP= 100) NPHI= 0(MAXP= 0) NIMPHI= 0(MAXIMP= 0) NDON= 0(MAXPAD= 0) NACC= 0(MAXPAD= 0) NNB= 0(MAXNB= 0) X-PLOR> X-PLOR>set message=all end X-PLOR> X-PLOR>evaluate ($abce=12.0+50.) EVALUATE: symbol $ABCE set to 62.0000 (real) X-PLOR>display $abce 62 X-PLOR>evaluate ($test=$abce^2+$pi) EVALUATE: symbol $TEST set to 3847.14 (real) X-PLOR>display $test 3847.14 X-PLOR> X-PLOR>$? Current Symbol Table $KBOLTZ= 0.198719E-02 (real) $PI= 3.14159 (real) $TIMFAC= 0.488882E-01 (real) $NAME="schwitrs" (string) $SYSTEM="x86_64/Linux" (string) $XPLOR_VERSION="3.851" (string) $NOEXPECTATION= 0.100000E+21 (real) $VOLUME= 1.00000 (real) $XRCELL_1= 1.00000 (real) $XRCELL_2= 1.00000 (real) $XRCELL_3= 1.00000 (real) $XRCELL_4= 90.0000 (real) $XRCELL_5= 90.0000 (real) $XRCELL_6= 90.0000 (real) $XRTR_1_1= 1.00000 (real) $XRTR_1_2= 0.349148E-14 (real) $XRTR_1_3= 0.349148E-14 (real) $XRTR_2_1= 0.00000 (real) $XRTR_2_2= 1.00000 (real) $XRTR_2_3= 0.349148E-14 (real) $XRTR_3_1= 0.00000 (real) $XRTR_3_2= 0.00000 (real) $XRTR_3_3= 1.00000 (real) $XRINTR_1_1= 1.00000 (real) $XRINTR_1_2= -0.349148E-14 (real) $XRINTR_1_3= -0.349148E-14 (real) $XRINTR_2_1= 0.00000 (real) $XRINTR_2_2= 1.00000 (real) $XRINTR_2_3= -0.349148E-14 (real) $XRINTR_3_1= 0.00000 (real) $XRINTR_3_2= 0.00000 (real) $XRINTR_3_3= 1.00000 (real) $ASTAR= 1.00000 (real) $BSTAR= 1.00000 (real) $CSTAR= 1.00000 (real) $SYMMETRY= 1.00000 (real) $SYMMETRY_OP_1="(X,Y,Z)" (string) $SYMMETRY2= 1.00000 (real) $SYMMETRY2_OP_1="(X,Y,Z)" (string) $CENTRIC_SPACEGROUP="FALSE" (string) $NCS= 1.00000 (real) $F000= 0.00000 (real) $DIHED_TOL= 0.995000 (real) $ECHO="ON " (logical) $MESSAGES="ALL " (string) $PRINT_FILE="OUTPUT" (string) $START_TIME="10:47:49" (string) $START_DATE=" 5-Feb-08" (string) $PREV_MESSAGES="ALL " (string) $1="E" (string) $2= 1.00000 (real) $RR="a" (string) $1_TYPE="ST" (string) $FOR_LINE=" for $2 in ( 1 2 3 ) loop sub " (string) $A= 3.00000 (real) $A_TYPE="DP" (string) $2_TYPE="DP" (string) $1A= 123.460 (real) $2A= 10.0300 (real) $ABCE= 62.0000 (real) $TEST= 3847.14 (real) X-PLOR> X-PLOR>vector do (x=0.) ( all ) SELRPN: 9 atoms have been selected out of 9 X-PLOR>vector do (x=x+$abce) ( all ) SELRPN: 9 atoms have been selected out of 9 X-PLOR>vector show (x) ( all ) SELRPN: 9 atoms have been selected out of 9 ( TEST TEST 1 A ) 62.000 ( TEST TEST 1 B ) 62.000 ( TEST TEST 1 C ) 62.000 ( TEST TEST 1 D ) 62.000 ( TEST TEST 1 E ) 62.000 ( TEST TEST 1 F ) 62.000 ( TEST TEST 1 G ) 62.000 ( TEST TEST 1 H ) 62.000 ( TEST TEST 1 I ) 62.000 X-PLOR> X-PLOR>evaluate ($test="hell"+" abcd "+"1") EVALUATE: symbol $TEST set to "hell abcd 1" (string) X-PLOR>evaluate ($rr=1+1.0e-03) EVALUATE: symbol $RR set to 1.00100 (real) X-PLOR> X-PLOR>{* comparisons } X-PLOR> X-PLOR>evaluate ($1=1.0) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR>if ($1=1) then end if NEXTCD: condition evaluated as true X-PLOR> X-PLOR>evaluate ($1=1.0+33.3-33.3+0.00000000000001) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR>if ($1=1) then end if NEXTCD: condition evaluated as true X-PLOR>evaluate ($1=1.0+33.3-33.3+0.00000000001) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR>if ($1=1) then end if NEXTCD: condition evaluated as true X-PLOR>evaluate ($1=1.0+33.3-33.3+0.000001) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR>if ($1=1) then end if NEXTCD: condition evaluated as false X-PLOR> X-PLOR>evaluate ($1=5.) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR>evaluate ($2=5.) EVALUATE: symbol $2 set to 5.00000 (real) X-PLOR>if ($1>=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1<=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1<$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1>$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1#$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1=$2) then end if NEXTCD: condition evaluated as true X-PLOR> X-PLOR>evaluate ($1=5.) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR>evaluate ($2=4.) EVALUATE: symbol $2 set to 4.00000 (real) X-PLOR>if ($1>=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1<=$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1<$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1>$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1#$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1=$2) then end if NEXTCD: condition evaluated as false X-PLOR> X-PLOR>evaluate ($1="test") EVALUATE: symbol $1 set to "test" (string) X-PLOR>evaluate ($2="test") EVALUATE: symbol $2 set to "test" (string) X-PLOR>if ($1>=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1<=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1<$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1>$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1#$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1=$2) then end if NEXTCD: condition evaluated as true X-PLOR> X-PLOR>evaluate ($1="test") EVALUATE: symbol $1 set to "test" (string) X-PLOR>evaluate ($2="tesu") EVALUATE: symbol $2 set to "tesu" (string) X-PLOR>if ($1>=$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1<=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1<$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1>$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1#$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1=$2) then end if NEXTCD: condition evaluated as false X-PLOR> X-PLOR>evaluate ($1=(1.,2.)) EVALUATE: symbol $1 set to ( 1.00000 , 2.00000 ) (complex) X-PLOR>evaluate ($2=(1.,2.)) EVALUATE: symbol $2 set to ( 1.00000 , 2.00000 ) (complex) X-PLOR>if ($1=$2) then end if NEXTCD: condition evaluated as true X-PLOR>if ($1#$2) then end if NEXTCD: condition evaluated as false X-PLOR> X-PLOR>evaluate ($1=(2.,3.)) EVALUATE: symbol $1 set to ( 2.00000 , 3.00000 ) (complex) X-PLOR>evaluate ($2=(1.,2.)) EVALUATE: symbol $2 set to ( 1.00000 , 2.00000 ) (complex) X-PLOR>if ($1=$2) then end if NEXTCD: condition evaluated as false X-PLOR>if ($1#$2) then end if NEXTCD: condition evaluated as true X-PLOR> X-PLOR>{* implicit assignment in FOR loops *} X-PLOR>evaluate ($1="test") EVALUATE: symbol $1 set to "test" (string) X-PLOR>evaluate ($2="1") EVALUATE: symbol $2 set to "1" (string) X-PLOR>evaluate ($3=1) EVALUATE: symbol $3 set to 1.00000 (real) X-PLOR>evaluate ($4=(4.,5)) EVALUATE: symbol $4 set to ( 4.00000 , 5.00000 ) (complex) X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main Assuming literal string "A" FOR LOOP: symbol INDEX set to "A" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "A" (string) X-PLOR> display $index A X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main Assuming literal string "B" FOR LOOP: symbol INDEX set to "B" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "B" (string) X-PLOR> display $index B X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main Assuming literal string "D" FOR LOOP: symbol INDEX set to "D" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "D" (string) X-PLOR> display $index D X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main Assuming literal string "E" FOR LOOP: symbol INDEX set to "E" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "E" (string) X-PLOR> display $index E X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to "f" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "f" (string) X-PLOR> display $index f X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to "1" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "1" (string) X-PLOR> display $index 1 X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to 1.00000 (real) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to 1.00000 (real) X-PLOR> display $index 1 X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to 2.00000 (real) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to 2.00000 (real) X-PLOR> display $index 2 X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to "test" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "test" (string) X-PLOR> display $index test X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to "1" (string) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to "1" (string) X-PLOR> display $index 1 X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to 1.00000 (real) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to 1.00000 (real) X-PLOR> display $index 1 X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main FOR LOOP: symbol INDEX set to ( 4.00000 , 5.00000 ) (complex) X-PLOR> evaluate ($index=$index) EVALUATE: symbol $INDEX set to ( 4.00000 , 5.00000 ) (complex) X-PLOR> display $index (4,5) X-PLOR>end loop main X-PLOR>for $index in ( a b d e "f" "1" 1 2 $1 $2 $3 $4 ) loop main X-PLOR> evaluate ($index=$index) X-PLOR> display $index X-PLOR>end loop main X-PLOR> X-PLOR>for $index in ( a "(" ")" 1 b ) loop main Assuming literal string "A" FOR LOOP: symbol INDEX set to "A" (string) X-PLOR>end loop main X-PLOR>for $index in ( a "(" ")" 1 b ) loop main FOR LOOP: symbol INDEX set to "(" (string) X-PLOR>end loop main X-PLOR>for $index in ( a "(" ")" 1 b ) loop main FOR LOOP: symbol INDEX set to ")" (string) X-PLOR>end loop main X-PLOR>for $index in ( a "(" ")" 1 b ) loop main FOR LOOP: symbol INDEX set to 1.00000 (real) X-PLOR>end loop main X-PLOR>for $index in ( a "(" ")" 1 b ) loop main Assuming literal string "B" FOR LOOP: symbol INDEX set to "B" (string) X-PLOR>end loop main X-PLOR>for $index in ( a "(" ")" 1 b ) loop main X-PLOR>end loop main X-PLOR> X-PLOR>{* for in FOR IN ID loops *} X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main SELRPN: 4 atoms have been selected out of 9 FOR ID LOOP: symbol 1 set to 1.00000 (real) X-PLOR> evaluate ($1=$1) EVALUATE: symbol $1 set to 1.00000 (real) X-PLOR> vector show ( name ) ( id $1 ) SELRPN: 1 atoms have been selected out of 9 ( TEST TEST 1 A ) A X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main FOR ID LOOP: symbol 1 set to 2.00000 (real) X-PLOR> evaluate ($1=$1) EVALUATE: symbol $1 set to 2.00000 (real) X-PLOR> vector show ( name ) ( id $1 ) SELRPN: 1 atoms have been selected out of 9 ( TEST TEST 1 B ) B X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main FOR ID LOOP: symbol 1 set to 5.00000 (real) X-PLOR> evaluate ($1=$1) EVALUATE: symbol $1 set to 5.00000 (real) X-PLOR> vector show ( name ) ( id $1 ) SELRPN: 1 atoms have been selected out of 9 ( TEST TEST 1 E ) E X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main FOR ID LOOP: symbol 1 set to 6.00000 (real) X-PLOR> evaluate ($1=$1) EVALUATE: symbol $1 set to 6.00000 (real) X-PLOR> vector show ( name ) ( id $1 ) SELRPN: 1 atoms have been selected out of 9 ( TEST TEST 1 F ) F X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main X-PLOR> evaluate ($1=$1) X-PLOR> vector show ( name ) ( id $1 ) X-PLOR>end loop main X-PLOR> X-PLOR>{* nested FOR ID loops *} X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main SELRPN: 4 atoms have been selected out of 9 FOR ID LOOP: symbol 1 set to 1.00000 (real) X-PLOR> for $2 in id ( name c or name d ) loop sub SELRPN: 2 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display $1 $2 1 3 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub FOR ID LOOP: symbol 2 set to 4.00000 (real) X-PLOR> display $1 $2 1 4 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main FOR ID LOOP: symbol 1 set to 2.00000 (real) X-PLOR> for $2 in id ( name c or name d ) loop sub SELRPN: 2 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display $1 $2 2 3 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub FOR ID LOOP: symbol 2 set to 4.00000 (real) X-PLOR> display $1 $2 2 4 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main FOR ID LOOP: symbol 1 set to 5.00000 (real) X-PLOR> for $2 in id ( name c or name d ) loop sub SELRPN: 2 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display $1 $2 5 3 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub FOR ID LOOP: symbol 2 set to 4.00000 (real) X-PLOR> display $1 $2 5 4 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main FOR ID LOOP: symbol 1 set to 6.00000 (real) X-PLOR> for $2 in id ( name c or name d ) loop sub SELRPN: 2 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 3.00000 (real) X-PLOR> display $1 $2 6 3 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub FOR ID LOOP: symbol 2 set to 4.00000 (real) X-PLOR> display $1 $2 6 4 X-PLOR> end loop sub X-PLOR> for $2 in id ( name c or name d ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in id ( name a or name b or name e or name f ) loop main X-PLOR> for $2 in id ( name c or name d ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR> X-PLOR>{* nested FOR ID loops *} X-PLOR>for $1 in ( "A" "B" "X" "F" ) loop main FOR LOOP: symbol 1 set to "A" (string) X-PLOR> for $2 in id ( name $1 ) loop sub SELRPN: 1 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 1.00000 (real) X-PLOR> display $1 $2 A 1 X-PLOR> end loop sub X-PLOR> for $2 in id ( name $1 ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in ( "A" "B" "X" "F" ) loop main FOR LOOP: symbol 1 set to "B" (string) X-PLOR> for $2 in id ( name $1 ) loop sub SELRPN: 1 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 2.00000 (real) X-PLOR> display $1 $2 B 2 X-PLOR> end loop sub X-PLOR> for $2 in id ( name $1 ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in ( "A" "B" "X" "F" ) loop main FOR LOOP: symbol 1 set to "X" (string) X-PLOR> for $2 in id ( name $1 ) loop sub SELRPN: 0 atoms have been selected out of 9 X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in ( "A" "B" "X" "F" ) loop main FOR LOOP: symbol 1 set to "F" (string) X-PLOR> for $2 in id ( name $1 ) loop sub SELRPN: 1 atoms have been selected out of 9 FOR ID LOOP: symbol 2 set to 6.00000 (real) X-PLOR> display $1 $2 F 6 X-PLOR> end loop sub X-PLOR> for $2 in id ( name $1 ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR>for $1 in ( "A" "B" "X" "F" ) loop main X-PLOR> for $2 in id ( name $1 ) loop sub X-PLOR> display $1 $2 X-PLOR> end loop sub X-PLOR>end loop main X-PLOR> X-PLOR>{* precision in substitutions *} X-PLOR>evaluate ($1=1.234567789123455) EVALUATE: symbol $1 set to 1.23457 (real) X-PLOR>evaluate ($2=101220.4344444) EVALUATE: symbol $2 set to 101220. (real) X-PLOR>display $1 $2 1.23457 101220 X-PLOR>set SET> seed=$1 SET> seed ? SEED= 1.2346 SET>end X-PLOR>set precision=10 end X-PLOR>display $1 $2 1.234567789 101220.4344 X-PLOR>set SET> seed=$1 SET> seed ? SEED= 1.2346 SET>end X-PLOR> X-PLOR>{* test display *} X-PLOR>evaluate ($1="test") EVALUATE: symbol $1 set to "test" (string) X-PLOR>evaluate ($2="1") EVALUATE: symbol $2 set to "1" (string) X-PLOR>evaluate ($3=1) EVALUATE: symbol $3 set to 1.00000 (real) X-PLOR>evaluate ($4=(4.,5)) EVALUATE: symbol $4 set to ( 4.00000 , 5.00000 ) (complex) X-PLOR>display $1 $2 $3 $4 test 1 1 (4,5) X-PLOR>display $1=$2($3)$4 test=1(1)(4,5) X-PLOR>display "$1" "$1" X-PLOR> X-PLOR>{* comment handling *} X-PLOR>structure end { this is a test !!! blah{}{}{}{!!!} blah } X-PLOR>str{test test test}ucture STRUcture> ? XPLOR: current counts (number in parenthesis is maximum) NATOM= 9(MAXA= 200) NBOND= 0(MAXB= 0) NTHETA= 0(MAXT= 0) NGRP= 1(MAXGRP= 100) NPHI= 0(MAXP= 0) NIMPHI= 0(MAXIMP= 0) NDON= 0(MAXPAD= 0) NACC= 0(MAXPAD= 0) NNB= 0(MAXNB= 0) STRUcture>e{{hhhhh}}nd !! testing { {{{{ X-PLOR> X-PLOR>{* test conversion to upper case characters *} X-PLOR>evaluate ($1="ABCDEFGHIJKLMNOPQRSTUVWXYZ") EVALUATE: symbol $1 set to "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (string) X-PLOR>evaluate ($2=abcdefghijklmnopqrstuvwxyz) Assuming literal string "ABCDEFGHIJKLMNOPQRSTUVWXYZ" EVALUATE: symbol $2 set to "ABCDEFGHIJKLMNOPQRSTUVWXYZ" (string) X-PLOR>if ($1=$2) then NEXTCD: condition evaluated as true X-PLOR>elseif ($1 # $2) then NEXTCD: condition evaluated as false X-PLOR>end if X-PLOR> X-PLOR>{* test "silent" mode *} X-PLOR>set message=off end X-PLOR>set echo=off end A B D E OK !!! %NEXTCD-ERR: Mismatched data types: elseif ($1 > 5 ^ X-PLOR>set display=parsertest.dat end ASSFIL: file /home/schwitrs/xplor-bzr/test/parsertest.dat opened. X-PLOR>display structure X-PLOR>display end X-PLOR>close parsertest.dat end X-PLOR> X-PLOR>@parsertest.dat ASSFIL: file /home/schwitrs/xplor-bzr/test/parsertest.dat opened. X-PLOR> structure STRUcture> end X-PLOR> X-PLOR>for $1 in ( e r d ) loop main Assuming literal string "E" FOR LOOP: symbol 1 set to "E" (string) X-PLOR> @parsertest.dat set precision=6 end ASSFIL: file /home/schwitrs/xplor-bzr/test/parsertest.dat opened. X-PLOR> structure STRUcture> end X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR>for $1 in ( e r d ) loop main Assuming literal string "R" FOR LOOP: symbol 1 set to "R" (string) X-PLOR> X-PLOR> structure STRUcture> end X-PLOR> X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR>for $1 in ( e r d ) loop main Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) X-PLOR> X-PLOR> structure STRUcture> end X-PLOR> X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR>for $1 in ( e r d ) loop main X-PLOR> X-PLOR> structure X-PLOR> end X-PLOR> X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR> X-PLOR>for $1 in ( e r d ) loop main Assuming literal string "E" FOR LOOP: symbol 1 set to "E" (string) X-PLOR> @@parsertest.dat set precision=6 end ASSFIL: file /home/schwitrs/xplor-bzr/test/parsertest.dat opened. X-PLOR> structure STRUcture> end X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR>for $1 in ( e r d ) loop main Assuming literal string "R" FOR LOOP: symbol 1 set to "R" (string) X-PLOR> @@parsertest.dat set precision=6 end ASSFIL: file /home/schwitrs/xplor-bzr/test/parsertest.dat opened. X-PLOR> structure STRUcture> end X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR>for $1 in ( e r d ) loop main Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) X-PLOR> @@parsertest.dat set precision=6 end ASSFIL: file /home/schwitrs/xplor-bzr/test/parsertest.dat opened. X-PLOR> structure STRUcture> end X-PLOR> set precision=6 end X-PLOR>end loop main X-PLOR>for $1 in ( e r d ) loop main X-PLOR> @@parsertest.dat set precision=6 end X-PLOR>end loop main X-PLOR> X-PLOR>set display=OUTPUT end X-PLOR> X-PLOR>display $EXIST_CPU TRUE X-PLOR>evaluate ($rrr=1234) EVALUATE: symbol $RRR set to 1234.00 (real) X-PLOR>display $EXIST_RRR TRUE X-PLOR>display $EXIST_rrt FALSE X-PLOR> X-PLOR>{* test FORMAT specs for symbols *} X-PLOR>evaluate ($abcd=10.4) EVALUATE: symbol $ABCD set to 10.4000 (real) X-PLOR>display $abcd 10.4 X-PLOR>display $abcd[E10.4] 0.1040E+02 X-PLOR>display $abcd[G14.5] 10.400 X-PLOR>evaluate ($abcd2=3.4) EVALUATE: symbol $ABCD2 set to 3.40000 (real) X-PLOR>evaluate ($abcd1=1.2) EVALUATE: symbol $ABCD1 set to 1.20000 (real) X-PLOR>display $abcd[F10.4] $abcd2[F10.4] $abcd1[F10.4] 10.4000 3.4000 1.2000 X-PLOR>evaluate ($abcd=1770.4) EVALUATE: symbol $ABCD set to 1770.40 (real) X-PLOR>evaluate ($abcd2=333.4) EVALUATE: symbol $ABCD2 set to 333.400 (real) X-PLOR>evaluate ($abcd1=43431.24) EVALUATE: symbol $ABCD1 set to 43431.2 (real) X-PLOR>display $abcd[F10.4] $abcd2[F10.4] $abcd1[F10.4] 1770.4000 333.4000 43431.2400 X-PLOR> X-PLOR> X-PLOR>evaluate ($abcd=(1.,2.)) EVALUATE: symbol $ABCD set to ( 1.00000 , 2.00000 ) (complex) X-PLOR>display $abcd (1,2) X-PLOR>display $abcd[F10.4] 1.0000 2.0000 X-PLOR> X-PLOR> X-PLOR> X-PLOR> X-PLOR>xrefin XREFINE> XREFINE> symmetry=( X,Y,Z ) XREFINE> symmetry=( 1/2-X,-Y,1/2+Z ) XREFINE> symmetry=( -X,1/2+Y,1/2-Z ) XREFINE> symmetry=( 1/2+X,1/2-Y,-Z ) XREFINE> XREFINE> display { SYMMETRY_OP_1 } symmetry = $symmetry_op_1 { SYMMETRY_OP_1 } symmetry = (X,Y,Z) XREFINE> display { SYMMETRY_OP_2 } symmetry = $symmetry_op_2 { SYMMETRY_OP_2 } symmetry = (1/2-X,-Y,1/2+Z) XREFINE> display { SYMMETRY_OP_3 } symmetry = $symmetry_op_3 { SYMMETRY_OP_3 } symmetry = (-X,1/2+Y,1/2-Z) XREFINE> display { SYMMETRY_OP_4 } symmetry = $symmetry_op_4 { SYMMETRY_OP_4 } symmetry = (1/2+X,1/2-Y,-Z) XREFINE> XREFINE> evaluate ($i=0) EVALUATE: symbol $I set to 0.00000 (real) XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 1.00000 (real) XREFINE> display symmetry = $symmetry_op_$i symmetry = (X,Y,Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 2.00000 (real) XREFINE> display symmetry = $symmetry_op_$i symmetry = (1/2-X,-Y,1/2+Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 3.00000 (real) XREFINE> display symmetry = $symmetry_op_$i symmetry = (-X,1/2+Y,1/2-Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 4.00000 (real) XREFINE> display symmetry = $symmetry_op_$i symmetry = (1/2+X,1/2-Y,-Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as false XREFINE> evaluate ($i=$i+1) XREFINE> display symmetry = $symmetry_op_$i XREFINE> end loop disp XREFINE> XREFINE> evaluate ($i=0) EVALUATE: symbol $I set to 0.00000 (real) XREFINE> evaluate ($x=op) Assuming literal string "OP" EVALUATE: symbol $X set to "OP" (string) XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 1.00000 (real) XREFINE> display symmetry = $symmetry_$x_$i symmetry = (X,Y,Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 2.00000 (real) XREFINE> display symmetry = $symmetry_$x_$i symmetry = (1/2-X,-Y,1/2+Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 3.00000 (real) XREFINE> display symmetry = $symmetry_$x_$i symmetry = (-X,1/2+Y,1/2-Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as true XREFINE> evaluate ($i=$i+1) EVALUATE: symbol $I set to 4.00000 (real) XREFINE> display symmetry = $symmetry_$x_$i symmetry = (1/2+X,1/2-Y,-Z) XREFINE> end loop disp XREFINE> while ($i < 4) loop disp NEXTCD: condition evaluated as false XREFINE> evaluate ($i=$i+1) XREFINE> display symmetry = $symmetry_$x_$i XREFINE> end loop disp XREFINE> XREFINE>end X-PLOR> X-PLOR> X-PLOR> X-PLOR> evaluate ($i=0) EVALUATE: symbol $I set to 0.00000 (real) X-PLOR> evaluate ($sum=0) EVALUATE: symbol $SUM set to 0.00000 (real) X-PLOR> X-PLOR> while ($i < 3) loop i NEXTCD: condition evaluated as true X-PLOR> evaluate ($i=$i+1) EVALUATE: symbol $I set to 1.00000 (real) X-PLOR> X-PLOR> evaluate ($j=0) EVALUATE: symbol $J set to 0.00000 (real) X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 1.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_1_1 set to 2.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 2.00000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 1 j= 1 a(i,j)= 2 sum= 2 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 2.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_1_2 set to 3.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 5.00000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 1 j= 2 a(i,j)= 3 sum= 5 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 3.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_1_3 set to 4.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 9.00000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 1 j= 3 a(i,j)= 4 sum= 9 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as false X-PLOR> evaluate ($j=$j+1) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum X-PLOR> X-PLOR> end loop j X-PLOR> X-PLOR> end loop i X-PLOR> while ($i < 3) loop i NEXTCD: condition evaluated as true X-PLOR> evaluate ($i=$i+1) EVALUATE: symbol $I set to 2.00000 (real) X-PLOR> X-PLOR> evaluate ($j=0) EVALUATE: symbol $J set to 0.00000 (real) X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 1.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_2_1 set to 3.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 12.0000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 2 j= 1 a(i,j)= 3 sum= 12 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 2.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_2_2 set to 4.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 16.0000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 2 j= 2 a(i,j)= 4 sum= 16 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 3.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_2_3 set to 5.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 21.0000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 2 j= 3 a(i,j)= 5 sum= 21 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as false X-PLOR> evaluate ($j=$j+1) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum X-PLOR> X-PLOR> end loop j X-PLOR> X-PLOR> end loop i X-PLOR> while ($i < 3) loop i NEXTCD: condition evaluated as true X-PLOR> evaluate ($i=$i+1) EVALUATE: symbol $I set to 3.00000 (real) X-PLOR> X-PLOR> evaluate ($j=0) EVALUATE: symbol $J set to 0.00000 (real) X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 1.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_3_1 set to 4.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 25.0000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 3 j= 1 a(i,j)= 4 sum= 25 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 2.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_3_2 set to 5.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 30.0000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 3 j= 2 a(i,j)= 5 sum= 30 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as true X-PLOR> evaluate ($j=$j+1) EVALUATE: symbol $J set to 3.00000 (real) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) EVALUATE: symbol $A_3_3 set to 6.00000 (real) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) EVALUATE: symbol $SUM set to 36.0000 (real) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum i= 3 j= 3 a(i,j)= 6 sum= 36 X-PLOR> X-PLOR> end loop j X-PLOR> while ($j < 3) loop j NEXTCD: condition evaluated as false X-PLOR> evaluate ($j=$j+1) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum X-PLOR> X-PLOR> end loop j X-PLOR> X-PLOR> end loop i X-PLOR> while ($i < 3) loop i NEXTCD: condition evaluated as false X-PLOR> evaluate ($i=$i+1) X-PLOR> X-PLOR> evaluate ($j=0) X-PLOR> while ($j < 3) loop j X-PLOR> evaluate ($j=$j+1) X-PLOR> X-PLOR> evaluate ($a_$i_$j=$i+$j) X-PLOR> evaluate ($sum=$sum+$a_$i_$j) X-PLOR> display i= $i j= $j a(i,j)= $a_$i_$j sum= $sum X-PLOR> X-PLOR> end loop j X-PLOR> X-PLOR> end loop i X-PLOR> X-PLOR> X-PLOR> X-PLOR> X-PLOR>eval ($junk="$junk") EVALUATE: symbol $JUNK set to "$junk" (string) X-PLOR>set display=abcd.dat end ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. X-PLOR>display a b c d X-PLOR>display 1 2 3 4 X-PLOR>display $junk X-PLOR> X-PLOR>set display=OUTPUT end X-PLOR>close abcd.dat end X-PLOR> X-PLOR> X-PLOR>evaluate ($junk=(1.0, 2.0)) EVALUATE: symbol $JUNK set to ( 1.00000 , 2.00000 ) (complex) X-PLOR> X-PLOR>{* TEST 1 ------------------ } X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type A ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type B ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type C ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type D ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main FOR LOOP: symbol 1 set to 1.00000 (real) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type 1 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main FOR LOOP: symbol 1 set to 2.00000 (real) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type 2 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main FOR LOOP: symbol 1 set to 3.00000 (real) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type 3 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main FOR LOOP: symbol 1 set to 4.00000 (real) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type 4 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main FOR LOOP: symbol 1 set to ( 1.00000 , 2.00000 ) (complex) X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> display $1 $1_type (1,2) DC X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> X-PLOR> display $for_line X-PLOR> display $1 $1_type X-PLOR> X-PLOR>end loop main X-PLOR> X-PLOR> display $for_line for $1 in ( a b c d 1 2 3 4 $junk) loop main X-PLOR> X-PLOR> X-PLOR> X-PLOR> X-PLOR>{* TEST 2 ------------------ } X-PLOR>for $1 in ( @abcd.dat ) loop main ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type A ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type B ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type C ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type D ST X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 1.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 1 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 2.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 2 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 3.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 3 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 4.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 4 DP X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR-clause$junk FOR LOOP: symbol 1 set to ( 1.00000 , 2.00000 ) (complex) FOR-clause= FOR-clause= ) loop main X-PLOR> X-PLOR> display $for_line $junk X-PLOR> display $1 $1_type (1,2) DC X-PLOR> X-PLOR>end loop main X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR-clause$junk FOR-clause FOR-clause ) loop main X-PLOR> X-PLOR> display $for_line X-PLOR> display $1 $1_type X-PLOR> X-PLOR>end loop main X-PLOR> display $for_line $junk X-PLOR> X-PLOR> X-PLOR>{* TEST 3 ------------------ } X-PLOR>evaluate ($file="abcd.dat") EVALUATE: symbol $FILE set to "abcd.dat" (string) X-PLOR> X-PLOR>for $1 in ( @$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type A ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type B ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type C ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type D ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 1.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 1 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 2.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 2 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 3.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 3 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 4.00000 (real) FOR-clause=$junk FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 4 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR-clause$junk FOR LOOP: symbol 1 set to ( 1.00000 , 2.00000 ) (complex) FOR-clause= FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line $junk X-PLOR> display $1 $1_type (1,2) DC X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( FOR-clause a b c d FOR-clause1 2 3 4 FOR-clause$junk FOR-clause FOR-clause ) loop inp X-PLOR> X-PLOR> display $for_line X-PLOR> display $1 $1_type X-PLOR> X-PLOR>end loop inp X-PLOR> display $for_line $junk X-PLOR> X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d Assuming literal string "A" FOR LOOP: symbol 1 set to "A" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type A ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d Assuming literal string "B" FOR LOOP: symbol 1 set to "B" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type B ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d Assuming literal string "C" FOR LOOP: symbol 1 set to "C" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type C ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d Assuming literal string "D" FOR LOOP: symbol 1 set to "D" (string) FOR-clause=1 2 3 4 FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line a b c d X-PLOR> display $1 $1_type D ST X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 1.00000 (real) FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 1 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 2.00000 (real) FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 2 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 3.00000 (real) FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 3 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d FOR-clause1 2 3 4 FOR LOOP: symbol 1 set to 4.00000 (real) FOR-clause=$junk FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line 1 2 3 4 X-PLOR> display $1 $1_type 4 DP X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d FOR-clause1 2 3 4 FOR-clause$junk FOR LOOP: symbol 1 set to ( 1.00000 , 2.00000 ) (complex) FOR-clause= ) loop inp X-PLOR> X-PLOR> display $for_line $junk X-PLOR> display $1 $1_type (1,2) DC X-PLOR> X-PLOR>end loop inp X-PLOR>for $1 in ( @@$file ) loop inp ASSFIL: file /home/schwitrs/xplor-bzr/test/abcd.dat opened. FOR-clause= a b c d FOR-clause1 2 3 4 FOR-clause$junk FOR-clause ) loop inp X-PLOR> X-PLOR> display $for_line X-PLOR> display $1 $1_type X-PLOR> X-PLOR>end loop inp X-PLOR> display $for_line $junk X-PLOR> X-PLOR> X-PLOR>{* TEST 4 ------------------ } X-PLOR>evaluate ($file="abcd.dat") EVALUATE: symbol $FILE set to "abcd.dat" (string) X-PLOR>evaluate ($i=1) EVALUATE: symbol $I set to 1.00000 (real) X-PLOR> X-PLOR>if ($i > 2) then NEXTCD: condition evaluated as false X-PLOR> X-PLOR>for $1 in ( @@$file ) loop inp X-PLOR> X-PLOR> display $for_line X-PLOR> display $1 $1_type X-PLOR> X-PLOR>end loop inp X-PLOR> display $for_line X-PLOR> X-PLOR>end if X-PLOR> X-PLOR>! test print=off X-PLOR>set display=off end ASSFIL: file /dev/null opened. X-PLOR>display "hello there" X-PLOR>set display=off end X-PLOR>set display=OUTPUT end X-PLOR>system cat off X-PLOR> X-PLOR>fileexist parsertest.dat end MISCOM: file exists X-PLOR>display $RESULT TRUE X-PLOR>fileexist parsertest.junk end MISCOM: file does not exist X-PLOR>display $RESULT FALSE X-PLOR> X-PLOR>stop HEAP: maximum use= 713122 current use= 665450 X-PLOR: total CPU time= 0.0500 s X-PLOR: entry time at 10:47:49 5-Feb-08 X-PLOR: exit time at 10:47:49 5-Feb-08