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