annotate runtime/indent/testdir/rapid.in @ 32721:94f4a488412e v9.0.1683

Updated runtime files Commit: https://github.com/vim/vim/commit/6efb1980336ff324e9c57a4e282530b952fca816 Author: Christian Brabandt <cb@256bit.org> Date: Thu Aug 10 05:44:25 2023 +0200 Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 10 Aug 2023 06:30:06 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32721
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 ! vim: set ft=rapid :
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 ! START_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 %%%
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 VERSION:1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 LANGUAGE:ENGLISH
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 %%%
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 module LowerCaseModule
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 task pers num n1 := 0;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 local pers num n2 := 1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 var bool b1 := false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 var intnum i1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 ! put some stuff in those strings that may confuse indentation
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 const string st1 := "endmodule (";
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 pers string st_Appl_Info{3,3}:=[
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 "["
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 "default"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 "case"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 ],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 "else"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 "then"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 "endif"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 ],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 "do"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 "}"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 ")"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 ],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 ];
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 pers tooldata tTool1:=[TRUE,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 [97.4, 0, 223.1],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 [0.924, 0, 0.383 ,0]
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 ],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 [5,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 [23, 0, 75],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 [1, 0, 0, 0], 0, 0, 0
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 ]
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 ];
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 const robtarget p1:=[
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 [600, 500, 225.3],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 [1, 0, 0, 0],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 [1, 1, 0, 0],
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 [ 11, 12.3, 9E9, 9E9, 9E9, 9E9]
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 ];
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 record myRec
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 num nRecNum1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 bool bRecBool1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 endrecord
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 proc proc1(num n1,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 num n2)
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 var string st1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 n1 := n1+1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 MoveJSync p1, vmax, z30, tool1, "proc2";
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 backward
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 MoveJSync p1, v100, fine, tool1, "proc2";
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 undo
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 n1 := n1-1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 error
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 trynext;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 endproc
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 func num nFunc1(
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 switch s1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 |switch s2
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 ,num n1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 ,bool b1)
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 var num nVar;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 if not Present(s1) return;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 if Present(s1) then
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 Incr n1;'
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 elseif Present(s2) then
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 b1:=false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 else
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 while n1>0 do
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 Decr n1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 test n1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 case 1:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
95 test1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
96 case 2:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
97 test2;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
98 default:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
99 WaitUntil false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
100 endtest
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
101 endwhile
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
102 endif
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
103 for i from 1 to 10 step 2 do
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
104 for j from 1 to 10 do
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
105 st_Appl_Info{i,j} := "";
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
106 endfor
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
107 endfor
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
108 ! return 1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
109 return 0;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
110 error
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
111 return -1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
112 endfunc
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
113
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
114 trap Trap1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
115 Reset do1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
116 endtrap
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
117
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
118 endmodule
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
119
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
120 MODULE UpperCaseModule(SYSMODULE,NOSTEPIN)
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
121 TASK pers num n1 := 0;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
122 LOCAL pers num n2 := 1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
123 VAR bool b1 := false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
124 VAR intnum i1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
125
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
126 LOCAL FUNC num nFunc1(
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
127 switch s1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
128 |switch s2
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
129 ,num n1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
130 ,bool b1)
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
131 VAR num nVar;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 IF NOT PRESENT(s1) RETURN;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 IF PRESENT(s1) THEN
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134 INCR n1;'
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 ELSEIF PRESENT(s2) THEN
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136 b1:=FALSE;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137 ELSE
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
138 WHILE n1>0 DO
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139 DECR n1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
140 TEST n1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
141
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
142 CASE 1:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
143 test1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
144 CASE 2:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
145 test2;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
146 DEFAULT:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
147 WAITUNTIL FALSE;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
148 ENDTEST
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
149 ENDWHILE
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
150 ENDIF
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
151 FOR i FROM 1 TO 10 STEP 2 DO
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
152 FOR j FROM 1 TO 10 DO
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
153 st_Appl_Info{i,j} := "";
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
154 ENDFOR
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
155 ENDFOR
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
156 ! RETURN 1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
157 RETURN 0;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
158 ERROR
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
159 RETURN -1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
160 ENDFUNC
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
161
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
162 TRAP Trap1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
163 Reset do1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
164 ENDTRAP
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
165
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
166 ENDMODULE
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
167
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
168 Module MixedCaseModule(SysModule)
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
169 Task pers num n1 := 0;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
170 Local pers num n2 := 1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
171 Var bool b1 := false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
172 Var intnum i1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
173
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
174 Task Func num nFunc1(
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
175 switch s1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
176 |switch s2
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
177 ,num n1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
178 ,bool b1)
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
179 Var num nVar;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
180 If Not Present(s1) Return;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
181 If Present(s1) Then
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
182 Incr n1;'
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
183 ElseIf Present(s2) Then
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
184 b1:=false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
185 Else
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
186 While n1>0 Do
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
187 Decr n1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
188 Test n1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
189
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
190 Case 1:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
191 test1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
192 Case 2:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
193 test2;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
194 Default:
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
195 WaitUntil false;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
196 EndTest
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
197 EndWhile
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
198 EndIf
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
199 For i From 1 To 10 Step 2 Do
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
200 For j From 1 To 10 Do
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
201 st_Appl_Info{i,j} := "";
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
202 EndFor
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
203 EndFor
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
204 ! Return 1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
205 Return 0;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
206 Error
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
207 Return -1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
208 EndFunc
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
209
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
210 Trap Trap1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
211 Reset do1;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
212 EndTrap
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
213
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
214 EndModule
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
215
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
216 ! END_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
217
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
218 ! START_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
219 ! INDENT_EXE let g:rapidSpaceIndent = 0
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
220 ! INDENT_EXE set shiftwidth=4
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
221
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
222 proc bla()
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
223 var num i;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
224 Incr i;
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
225 endproc
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
226
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
227 ! END_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
228
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
229 ! START_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
230 ! INDENT_EXE let g:rapidCommentIndent = 1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
231 !
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
232 proc bla()
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
233 ! indent this first column comment because of g:rapidCommentIndent=1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
234 endproc
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
235 ! END_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
236
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
237 ! START_INDENT
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
238 ! INDENT_EXE let g:rapidNewStyleIndent = 1
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
239 pers string st_Appl_Info{3,3}:=
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
240 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
241 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
242 "["
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
243 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
244 "default"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
245 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
246 "case"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
247 ]
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
248 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
249 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
250 "else"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
251 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
252 "then"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
253 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
254 "endif"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
255 ]
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
256 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
257 [
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
258 "do"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
259 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
260 "}"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
261 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
262 ")"
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
263 ]
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
264 ,
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
265 ];
94f4a488412e Updated runtime files
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
266 ! END_INDENT