krl.in (1914B)
1 ; vim: set ft=krl : 2 3 ; START_INDENT 4 5 def One() 6 int i 7 If i==1 then 8 While i>=1 9 For i=1 to 5 step 2 10 Loop 11 i = i+1 12 EndLoop 13 EndFor 14 EndWhile 15 Else 16 Repeat 17 Switch i 18 Case 1 19 Skip 123 20 i = i+1 21 EndSkip 123 22 Spline with $acc=100, $vel.cp=3 23 slin {x 100} 24 scirc {x 110, y 110}, {x 120, y 90} 25 slin {x 200} c_dis 26 Time_Block Start 27 slin {x 300} c_dis 28 Time_Block Part = 22.2 29 slin {y 400} c_dis 30 Time_Block Part = 33.3 31 Time_Block End = 10 32 slin {y 200} c_dis 33 Const_Vel Start +100 OnStart 34 slin {y 300} c_dis 35 slin {x 100} 36 Const_Vel End -5.5 37 slin {y 200} c_dis 38 EndSpline 39 Case 2,3 40 PTP_Spline with $acc=100, $vel.ptp=100 41 sptp {a1 0} c_ptp 42 sptp {a1 90} 43 EndSpline c_spl 44 Default 45 i = i+1 46 EndSwitch 47 Continue 48 Until False 49 EndIf 50 end 51 52 DEF Two() 53 int i 54 END 55 56 global def Three() 57 int i 58 end 59 60 GLOBAL DEF Four() 61 int i 62 END 63 64 Global Def Five() 65 int i 66 End 67 68 deffct bool fOne() 69 int i 70 endfct 71 72 DEFFCT bool fTwo() 73 int i 74 ENDFCT 75 76 global deffct bool fThree() 77 int i 78 endfct 79 80 GLOBAL DEFFCT bool fFour() 81 int i 82 ENDFCT 83 84 Global DefFct bool fFive() 85 int i 86 EndFct 87 88 DefDat datfile() 89 global int i=1 90 ; don't indent column 1 comments unless g:krlCommentIndent is set 91 ; global int o=2 92 EndDat 93 94 ; END_INDENT 95 96 ; START_INDENT 97 ; INDENT_EXE let g:krlSpaceIndent = 0 98 ; INDENT_EXE set shiftwidth=4 99 100 def bla() 101 int i 102 end 103 104 ; END_INDENT 105 106 ; START_INDENT 107 ; INDENT_EXE let g:krlCommentIndent = 1 108 def bla() 109 ; indent this first column comment because of g:krlCommentIndent=1 110 end 111 ; END_INDENT 112 113 ; START_INDENT 114 ; INDENT_EXE let g:krlIndentBetweenDef = 0 115 def bla() 116 int i ; don't indent this line because of g:krlIndentBetweenDef=0 117 end 118 ; END_INDENT 119 120 ; START_INDENT 121 ; INDENT_AT this-line 122 def Some() 123 int f 124 if true then 125 f = 1 ; this-line 126 endif 127 end 128 ; END_INDENT 129 130 ; START_INDENT 131 ; INDENT_NEXT next-line 132 def Some() 133 int i 134 ; next-line 135 i = 1 ; should get indent of line 'int i' above 136 end 137 ; END_INDENT 138 139 ; START_INDENT 140 ; INDENT_PREV prev-line 141 def Some() 142 int f 143 if true then 144 f = 1 145 ; prev-line 146 endif 147 end 148 ; END_INDENT