Lazstats: Refactor LatinSpecsUnit and latinSqrsUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7447 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-05-10 23:10:20 +00:00
parent ca4fa9b510
commit 907ce43f18
19 changed files with 6000 additions and 3540 deletions

View File

@ -0,0 +1,259 @@
36
5
A
VARIABLE 1
1
I
0
99999
L
B
VARIABLE 2
1
I
0
99999
L
Latin
VARIABLE 3
1
I
0
99999
L
Greek
VARIABLE 4
1
I
0
99999
L
DepVar
VARIABLE 5
5
F
3
99999
L
Case 0
A
B
Latin
Greek
DepVar
Case 1
1
1
1
1
2.00
Case 2
1
1
1
1
3.00
Case 3
1
1
1
1
5.00
Case 4
1
1
1
1
6.00
Case 5
1
2
2
2
4.00
Case 6
1
2
2
2
5.00
Case 7
1
2
2
2
7.00
Case 8
1
2
2
2
8.00
Case 9
1
3
3
3
5.00
Case 10
1
3
3
3
6.00
Case 11
1
3
3
3
8.00
Case 12
1
3
3
3
9.00
Case 13
2
1
2
3
4.00
Case 14
2
1
2
3
5.00
Case 15
2
1
2
3
7.00
Case 16
2
1
2
3
8.00
Case 17
2
2
3
1
10.00
Case 18
2
2
3
1
11.00
Case 19
2
2
3
1
13.00
Case 20
2
2
3
1
14.00
Case 21
2
3
1
2
6.00
Case 22
2
3
1
2
7.00
Case 23
2
3
1
2
9.00
Case 24
2
3
1
2
10.00
Case 25
3
1
3
2
5.00
Case 26
3
1
3
2
6.00
Case 27
3
1
3
2
8.00
Case 28
3
1
3
2
9.00
Case 29
3
2
1
3
6.00
Case 30
3
2
1
3
7.00
Case 31
3
2
1
3
9.00
Case 32
3
2
1
3
10.00
Case 33
3
3
2
1
8.00
Case 34
3
3
2
1
9.00
Case 35
3
3
2
1
11.00
Case 36
3
3
2
1
12.00

View File

@ -0,0 +1,259 @@
36
5
A (Col)
VARIABLE 1
1
I
0
99999
L
B (Cell)
VARIABLE 2
1
I
0
99999
L
Group (row)
VARIABLE 3
1
I
0
99999
L
Subject
VARIABLE 4
1
I
0
99999
L
DepVar
VARIABLE 5
4
F
2
99999
L
Case 0
A (Col)
B (Cell)
Group (row)
Subject
DepVar
Case 1
1
3
1
1
4.00
Case 2
1
3
1
2
5.00
Case 3
1
3
1
3
2.00
Case 4
1
3
1
4
3.00
Case 5
1
1
2
1
3.00
Case 6
1
1
2
2
6.00
Case 7
1
1
2
3
2.00
Case 8
1
1
2
4
4.00
Case 9
1
2
3
1
4.00
Case 10
1
2
3
2
2.00
Case 11
1
2
3
3
5.00
Case 12
1
2
3
4
3.00
Case 13
2
1
1
1
4.00
Case 14
2
1
1
2
4.00
Case 15
2
1
1
3
6.00
Case 16
2
1
1
4
5.00
Case 17
2
2
2
1
3.00
Case 18
2
2
2
2
5.00
Case 19
2
2
2
3
4.00
Case 20
2
2
2
4
6.00
Case 21
2
3
3
1
5.00
Case 22
2
3
3
2
4.00
Case 23
2
3
3
3
6.00
Case 24
2
3
3
4
6.00
Case 25
3
2
1
1
5.00
Case 26
3
2
1
2
2.00
Case 27
3
2
1
3
5.00
Case 28
3
2
1
4
6.00
Case 29
3
3
2
1
4.00
Case 30
3
3
2
2
3.00
Case 31
3
3
2
3
4.00
Case 32
3
3
2
4
5.00
Case 33
3
1
3
1
4.00
Case 34
3
1
3
2
3.00
Case 35
3
1
3
3
6.00
Case 36
3
1
3
4
5.00

View File

@ -0,0 +1,259 @@
36
5
A (Col)
VARIABLE 1
4
F
2
99999
L
B (Cell)
VARIABLE 2
4
F
2
99999
L
Subject
VARIABLE 3
4
F
2
99999
L
Group+C
VARIABLE 4
4
F
2
99999
L
DepVar
VARIABLE 5
4
F
2
99999
L
Case 0
A (Col)
B (Cell)
Subject
Group+C
DepVar
Case 1
1.00
3.00
1.00
1.00
4.00
Case 2
1.00
3.00
2.00
1.00
6.00
Case 3
1.00
3.00
3.00
1.00
5.00
Case 4
1.00
3.00
4.00
1.00
8.00
Case 5
2.00
1.00
1.00
1.00
7.00
Case 6
2.00
1.00
2.00
1.00
4.00
Case 7
2.00
1.00
3.00
1.00
2.00
Case 8
2.00
1.00
4.00
1.00
3.00
Case 9
3.00
2.00
1.00
1.00
5.00
Case 10
3.00
2.00
2.00
1.00
4.00
Case 11
3.00
2.00
3.00
1.00
6.00
Case 12
3.00
2.00
4.00
1.00
7.00
Case 13
1.00
1.00
1.00
2.00
5.00
Case 14
1.00
1.00
2.00
2.00
4.00
Case 15
1.00
1.00
3.00
2.00
6.00
Case 16
1.00
1.00
4.00
2.00
7.00
Case 17
2.00
2.00
1.00
2.00
3.00
Case 18
2.00
2.00
2.00
2.00
4.00
Case 19
2.00
2.00
3.00
2.00
2.00
Case 20
2.00
2.00
4.00
2.00
5.00
Case 21
3.00
3.00
1.00
2.00
4.00
Case 22
3.00
3.00
2.00
2.00
5.00
Case 23
3.00
3.00
3.00
2.00
6.00
Case 24
3.00
3.00
4.00
2.00
3.00
Case 25
1.00
2.00
1.00
3.00
7.00
Case 26
1.00
2.00
2.00
3.00
8.00
Case 27
1.00
2.00
3.00
3.00
5.00
Case 28
1.00
2.00
4.00
3.00
4.00
Case 29
2.00
3.00
1.00
3.00
5.00
Case 30
2.00
3.00
2.00
3.00
6.00
Case 31
2.00
3.00
3.00
3.00
2.00
Case 32
2.00
3.00
4.00
3.00
8.00
Case 33
3.00
1.00
1.00
3.00
6.00
Case 34
3.00
1.00
2.00
3.00
5.00
Case 35
3.00
1.00
3.00
3.00
4.00
Case 36
3.00
1.00
4.00
3.00
6.00

View File

@ -0,0 +1,303 @@
36
6
A (Col)
VARIABLE 1
4
F
2
99999
L
B (Cell)
VARIABLE 2
4
F
2
99999
L
C (Cell)
VARIABLE 3
4
F
2
99999
L
Subject
VARIABLE 4
4
F
2
99999
L
Group
VARIABLE 5
4
F
2
99999
L
DepVar
VARIABLE 6
4
F
2
99999
L
Case 0
A (Col)
B (Cell)
C (Cell)
Subject
Group
DepVar
Case 1
1.00
1.00
1.00
1.00
1.00
4.00
Case 2
1.00
1.00
1.00
2.00
1.00
6.00
Case 3
1.00
1.00
1.00
3.00
1.00
5.00
Case 4
1.00
1.00
1.00
4.00
1.00
8.00
Case 5
2.00
2.00
3.00
1.00
1.00
7.00
Case 6
2.00
2.00
3.00
2.00
1.00
4.00
Case 7
2.00
2.00
3.00
3.00
1.00
2.00
Case 8
2.00
2.00
3.00
4.00
1.00
3.00
Case 9
3.00
3.00
2.00
1.00
1.00
5.00
Case 10
3.00
3.00
2.00
2.00
1.00
4.00
Case 11
3.00
3.00
2.00
3.00
1.00
6.00
Case 12
3.00
3.00
2.00
4.00
1.00
7.00
Case 13
1.00
2.00
2.00
1.00
2.00
5.00
Case 14
1.00
2.00
2.00
2.00
2.00
4.00
Case 15
1.00
2.00
2.00
3.00
2.00
6.00
Case 16
1.00
2.00
2.00
4.00
2.00
7.00
Case 17
2.00
3.00
1.00
1.00
2.00
3.00
Case 18
2.00
3.00
1.00
2.00
2.00
4.00
Case 19
2.00
3.00
1.00
3.00
2.00
2.00
Case 20
2.00
3.00
1.00
4.00
2.00
5.00
Case 21
3.00
1.00
3.00
1.00
2.00
4.00
Case 22
3.00
1.00
3.00
2.00
2.00
5.00
Case 23
3.00
1.00
3.00
3.00
2.00
6.00
Case 24
3.00
1.00
3.00
4.00
2.00
3.00
Case 25
1.00
3.00
3.00
1.00
3.00
7.00
Case 26
1.00
3.00
3.00
2.00
3.00
8.00
Case 27
1.00
3.00
3.00
3.00
3.00
5.00
Case 28
1.00
3.00
3.00
4.00
3.00
4.00
Case 29
2.00
1.00
2.00
1.00
3.00
5.00
Case 30
2.00
1.00
2.00
2.00
3.00
6.00
Case 31
2.00
1.00
2.00
3.00
3.00
2.00
Case 32
2.00
1.00
2.00
4.00
3.00
8.00
Case 33
3.00
2.00
1.00
1.00
3.00
6.00
Case 34
3.00
2.00
1.00
2.00
3.00
5.00
Case 35
3.00
2.00
1.00
3.00
3.00
4.00
Case 36
3.00
2.00
1.00
4.00
3.00
6.00

View File

@ -0,0 +1,555 @@
72
6
Factor A
VARIABLE 1
4
F
2
99999
L
Factor B
VARIABLE 2
4
F
2
99999
L
Factor C
VARIABLE 3
4
F
2
99999
L
Subject
VARIABLE 4
5
F
3
99999
L
Group
VARIABLE 5
4
F
2
99999
L
DepVar
VARIABLE 6
4
F
2
99999
L
Case 0
Factor A
Factor B
Factor C
Subject
Group
DepVar
Case 1
1.00
1.00
1.00
1.00
1.00
1.00
Case 2
1.00
1.00
1.00
2.00
1.00
2.00
Case 3
1.00
1.00
1.00
3.00
1.00
3.00
Case 4
1.00
1.00
1.00
4.00
1.00
4.00
Case 5
2.00
2.00
1.00
1.00
1.00
2.00
Case 6
2.00
2.00
1.00
2.00
1.00
3.00
Case 7
2.00
2.00
1.00
3.00
1.00
4.00
Case 8
2.00
2.00
1.00
4.00
1.00
5.00
Case 9
3.00
3.00
1.00
1.00
1.00
3.00
Case 10
3.00
3.00
1.00
2.00
1.00
4.00
Case 11
3.00
3.00
1.00
3.00
1.00
5.00
Case 12
3.00
3.00
1.00
4.00
1.00
6.00
Case 13
1.00
2.00
1.00
5.00
2.00
2.00
Case 14
1.00
2.00
1.00
6.00
2.00
3.00
Case 15
1.00
2.00
1.00
7.00
2.00
4.00
Case 16
1.00
2.00
1.00
8.00
2.00
5.00
Case 17
2.00
3.00
1.00
5.00
2.00
3.00
Case 18
2.00
3.00
1.00
6.00
2.00
4.00
Case 19
2.00
3.00
1.00
7.00
2.00
5.00
Case 20
2.00
3.00
1.00
8.00
2.00
6.00
Case 21
3.00
1.00
1.00
5.00
2.00
4.00
Case 22
3.00
1.00
1.00
6.00
2.00
5.00
Case 23
3.00
1.00
1.00
7.00
2.00
6.00
Case 24
3.00
1.00
1.00
8.00
2.00
7.00
Case 25
1.00
3.00
1.00
9.00
3.00
1.00
Case 26
1.00
3.00
1.00
10.00
3.00
2.00
Case 27
1.00
3.00
1.00
11.00
3.00
3.00
Case 28
1.00
3.00
1.00
12.00
3.00
4.00
Case 29
2.00
1.00
1.00
9.00
3.00
2.00
Case 30
2.00
1.00
1.00
10.00
3.00
3.00
Case 31
2.00
1.00
1.00
11.00
3.00
4.00
Case 32
2.00
1.00
1.00
12.00
3.00
5.00
Case 33
3.00
2.00
1.00
9.00
3.00
3.00
Case 34
3.00
2.00
1.00
10.00
3.00
4.00
Case 35
3.00
2.00
1.00
11.00
3.00
5.00
Case 36
3.00
2.00
1.00
12.00
3.00
6.00
Case 37
1.00
2.00
2.00
13.00
4.00
3.00
Case 38
1.00
2.00
2.00
14.00
4.00
4.00
Case 39
1.00
2.00
2.00
15.00
4.00
5.00
Case 40
1.00
2.00
2.00
16.00
4.00
6.00
Case 41
2.00
3.00
2.00
13.00
4.00
4.00
Case 42
2.00
3.00
2.00
14.00
4.00
5.00
Case 43
2.00
3.00
2.00
15.00
4.00
6.00
Case 44
2.00
3.00
2.00
16.00
4.00
7.00
Case 45
3.00
1.00
2.00
13.00
4.00
5.00
Case 46
3.00
1.00
2.00
14.00
4.00
6.00
Case 47
3.00
1.00
2.00
15.00
4.00
7.00
Case 48
3.00
1.00
2.00
16.00
4.00
8.00
Case 49
1.00
1.00
2.00
17.00
5.00
4.00
Case 50
1.00
1.00
2.00
18.00
5.00
5.00
Case 51
1.00
1.00
2.00
19.00
5.00
6.00
Case 52
1.00
1.00
2.00
20.00
5.00
7.00
Case 53
2.00
2.00
2.00
17.00
5.00
4.00
Case 54
2.00
2.00
2.00
18.00
5.00
5.00
Case 55
2.00
2.00
2.00
19.00
5.00
6.00
Case 56
2.00
2.00
2.00
20.00
5.00
7.00
Case 57
3.00
3.00
2.00
17.00
5.00
5.00
Case 58
3.00
3.00
2.00
18.00
5.00
6.00
Case 59
3.00
3.00
2.00
19.00
5.00
7.00
Case 60
3.00
3.00
2.00
20.00
5.00
8.00
Case 61
1.00
3.00
2.00
21.00
6.00
3.00
Case 62
1.00
3.00
2.00
22.00
6.00
4.00
Case 63
1.00
3.00
2.00
23.00
6.00
5.00
Case 64
1.00
3.00
2.00
24.00
6.00
6.00
Case 65
2.00
1.00
2.00
21.00
6.00
4.00
Case 66
2.00
1.00
2.00
22.00
6.00
5.00
Case 67
2.00
1.00
2.00
23.00
6.00
6.00
Case 68
2.00
1.00
2.00
24.00
6.00
7.00
Case 69
3.00
2.00
2.00
21.00
6.00
5.00
Case 70
3.00
2.00
2.00
22.00
6.00
6.00
Case 71
3.00
2.00
2.00
23.00
6.00
7.00
Case 72
3.00
2.00
2.00
24.00
6.00
8.00

View File

@ -0,0 +1,555 @@
72
6
Factor A
VARIABLE 1
4
F
2
99999
L
Factor B
VARIABLE 2
4
F
2
99999
L
Factor C
VARIABLE 3
4
F
2
99999
L
Subject
VARIABLE 4
4
F
2
99999
L
Group
VARIABLE 5
4
F
2
99999
L
DepVar
VARIABLE 6
4
F
2
99999
L
Case 0
Factor A
Factor B
Factor C
Subject
Group
DepVar
Case 1
1.00
1.00
1.00
1.00
1.00
1.00
Case 2
1.00
1.00
1.00
2.00
1.00
2.00
Case 3
1.00
1.00
1.00
3.00
1.00
3.00
Case 4
1.00
1.00
1.00
4.00
1.00
4.00
Case 5
2.00
2.00
1.00
1.00
1.00
2.00
Case 6
2.00
2.00
1.00
2.00
1.00
3.00
Case 7
2.00
2.00
1.00
3.00
1.00
4.00
Case 8
2.00
2.00
1.00
4.00
1.00
5.00
Case 9
3.00
3.00
1.00
1.00
1.00
3.00
Case 10
3.00
3.00
1.00
2.00
1.00
4.00
Case 11
3.00
3.00
1.00
3.00
1.00
5.00
Case 12
3.00
3.00
1.00
4.00
1.00
6.00
Case 13
1.00
2.00
1.00
1.00
2.00
2.00
Case 14
1.00
2.00
1.00
2.00
2.00
3.00
Case 15
1.00
2.00
1.00
3.00
2.00
4.00
Case 16
1.00
2.00
1.00
4.00
2.00
5.00
Case 17
2.00
3.00
1.00
1.00
2.00
3.00
Case 18
2.00
3.00
1.00
2.00
2.00
4.00
Case 19
2.00
3.00
1.00
3.00
2.00
5.00
Case 20
2.00
3.00
1.00
4.00
2.00
6.00
Case 21
3.00
1.00
1.00
1.00
2.00
4.00
Case 22
3.00
1.00
1.00
2.00
2.00
5.00
Case 23
3.00
1.00
1.00
3.00
2.00
6.00
Case 24
3.00
1.00
1.00
4.00
2.00
7.00
Case 25
1.00
3.00
1.00
1.00
3.00
1.00
Case 26
1.00
3.00
1.00
2.00
3.00
2.00
Case 27
1.00
3.00
1.00
3.00
3.00
3.00
Case 28
1.00
3.00
1.00
4.00
3.00
4.00
Case 29
2.00
1.00
1.00
1.00
3.00
2.00
Case 30
2.00
1.00
1.00
2.00
3.00
3.00
Case 31
2.00
1.00
1.00
3.00
3.00
4.00
Case 32
2.00
1.00
1.00
4.00
3.00
5.00
Case 33
3.00
2.00
1.00
1.00
3.00
3.00
Case 34
3.00
2.00
1.00
2.00
3.00
4.00
Case 35
3.00
2.00
1.00
3.00
3.00
5.00
Case 36
3.00
2.00
1.00
4.00
3.00
6.00
Case 37
1.00
2.00
2.00
1.00
1.00
3.00
Case 38
1.00
2.00
2.00
2.00
1.00
4.00
Case 39
1.00
2.00
2.00
3.00
1.00
5.00
Case 40
1.00
2.00
2.00
4.00
1.00
6.00
Case 41
2.00
3.00
2.00
1.00
1.00
4.00
Case 42
2.00
3.00
2.00
2.00
1.00
5.00
Case 43
2.00
3.00
2.00
3.00
1.00
6.00
Case 44
2.00
3.00
2.00
4.00
1.00
7.00
Case 45
3.00
1.00
2.00
1.00
1.00
5.00
Case 46
3.00
1.00
2.00
2.00
1.00
6.00
Case 47
3.00
1.00
2.00
3.00
1.00
7.00
Case 48
3.00
1.00
2.00
4.00
1.00
8.00
Case 49
1.00
1.00
2.00
1.00
2.00
4.00
Case 50
1.00
1.00
2.00
2.00
2.00
5.00
Case 51
1.00
1.00
2.00
3.00
2.00
6.00
Case 52
1.00
1.00
2.00
4.00
2.00
7.00
Case 53
2.00
2.00
2.00
1.00
2.00
4.00
Case 54
2.00
2.00
2.00
2.00
2.00
5.00
Case 55
2.00
2.00
2.00
3.00
2.00
6.00
Case 56
2.00
2.00
2.00
4.00
2.00
7.00
Case 57
3.00
3.00
2.00
1.00
2.00
5.00
Case 58
3.00
3.00
2.00
2.00
2.00
6.00
Case 59
3.00
3.00
2.00
3.00
2.00
7.00
Case 60
3.00
3.00
2.00
4.00
2.00
8.00
Case 61
1.00
3.00
2.00
1.00
3.00
3.00
Case 62
1.00
3.00
2.00
2.00
3.00
4.00
Case 63
1.00
3.00
2.00
3.00
3.00
5.00
Case 64
1.00
3.00
2.00
4.00
3.00
6.00
Case 65
2.00
1.00
2.00
1.00
3.00
4.00
Case 66
2.00
1.00
2.00
2.00
3.00
5.00
Case 67
2.00
1.00
2.00
3.00
3.00
6.00
Case 68
2.00
1.00
2.00
4.00
3.00
7.00
Case 69
3.00
2.00
2.00
1.00
3.00
5.00
Case 70
3.00
2.00
2.00
2.00
3.00
6.00
Case 71
3.00
2.00
2.00
3.00
3.00
7.00
Case 72
3.00
2.00
2.00
4.00
3.00
8.00

View File

@ -0,0 +1,429 @@
54
6
FactorA
VARIABLE 1
4
F
2
99999
L
FactorB
VARIABLE 2
4
F
2
99999
L
FactorC
VARIABLE 3
4
F
2
99999
L
Person
VARIABLE 4
5
F
3
99999
L
Group
VARIABLE 5
4
F
2
99999
L
DepVar
VARIABLE 6
4
F
2
99999
L
Case 0
FactorA
FactorB
FactorC
Person
Group
DepVar
Case 1
1.00
2.00
1.00
1.00
1.00
2.00
Case 2
2.00
3.00
1.00
1.00
1.00
2.00
Case 3
3.00
1.00
1.00
1.00
1.00
3.00
Case 4
1.00
2.00
1.00
2.00
1.00
1.00
Case 5
2.00
3.00
1.00
2.00
1.00
1.00
Case 6
3.00
1.00
1.00
2.00
1.00
7.00
Case 7
1.00
2.00
2.00
3.00
4.00
5.00
Case 8
2.00
3.00
2.00
3.00
4.00
8.00
Case 9
3.00
1.00
2.00
3.00
4.00
1.00
Case 10
1.00
2.00
2.00
4.00
4.00
9.00
Case 11
2.00
3.00
2.00
4.00
4.00
12.00
Case 12
3.00
1.00
2.00
4.00
4.00
7.00
Case 13
1.00
2.00
3.00
5.00
7.00
5.00
Case 14
2.00
3.00
3.00
5.00
7.00
4.00
Case 15
3.00
1.00
3.00
5.00
7.00
6.00
Case 16
1.00
2.00
3.00
6.00
7.00
7.00
Case 17
2.00
3.00
3.00
6.00
7.00
5.00
Case 18
3.00
1.00
3.00
6.00
7.00
9.00
Case 19
1.00
1.00
1.00
7.00
2.00
5.00
Case 20
2.00
2.00
1.00
7.00
2.00
4.00
Case 21
3.00
3.00
1.00
7.00
2.00
7.00
Case 22
1.00
1.00
1.00
8.00
2.00
8.00
Case 23
2.00
2.00
1.00
8.00
2.00
5.00
Case 24
3.00
3.00
1.00
8.00
2.00
8.00
Case 25
1.00
1.00
2.00
9.00
5.00
8.00
Case 26
2.00
2.00
2.00
9.00
5.00
10.00
Case 27
3.00
3.00
2.00
9.00
5.00
4.00
Case 28
1.00
1.00
2.00
10.00
5.00
10.00
Case 29
2.00
2.00
2.00
10.00
5.00
14.00
Case 30
3.00
3.00
2.00
10.00
5.00
6.00
Case 31
1.00
1.00
3.00
11.00
8.00
10.00
Case 32
2.00
2.00
3.00
11.00
8.00
10.00
Case 33
3.00
3.00
3.00
11.00
8.00
8.00
Case 34
1.00
1.00
3.00
12.00
8.00
7.00
Case 35
2.00
2.00
3.00
12.00
8.00
3.00
Case 36
3.00
3.00
3.00
12.00
8.00
9.00
Case 37
1.00
3.00
1.00
13.00
3.00
3.00
Case 38
2.00
1.00
1.00
13.00
3.00
2.00
Case 39
3.00
2.00
1.00
13.00
3.00
5.00
Case 40
1.00
3.00
1.00
14.00
3.00
6.00
Case 41
2.00
1.00
1.00
14.00
3.00
4.00
Case 42
3.00
2.00
1.00
14.00
3.00
9.00
Case 43
1.00
3.00
2.00
15.00
6.00
8.00
Case 44
2.00
1.00
2.00
15.00
6.00
9.00
Case 45
3.00
2.00
2.00
15.00
6.00
6.00
Case 46
1.00
3.00
2.00
16.00
6.00
10.00
Case 47
2.00
1.00
2.00
16.00
6.00
10.00
Case 48
3.00
2.00
2.00
16.00
6.00
5.00
Case 49
1.00
3.00
3.00
17.00
9.00
12.00
Case 50
2.00
1.00
3.00
17.00
9.00
6.00
Case 51
3.00
2.00
3.00
17.00
9.00
10.00
Case 52
1.00
3.00
3.00
18.00
9.00
8.00
Case 53
2.00
1.00
3.00
18.00
9.00
8.00
Case 54
3.00
2.00
3.00
18.00
9.00
2.00

View File

@ -31,9 +31,9 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 8 Left = 8
Height = 15 Height = 15
Top = 491 Top = 491
Width = 66 Width = 99
BorderSpacing.Left = 8 BorderSpacing.Left = 8
Caption = 'No. per cell: ' Caption = 'No. Cases per cell: '
ParentColor = False ParentColor = False
end end
object VarList: TListBox object VarList: TListBox
@ -45,13 +45,14 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 8 Left = 8
Height = 445 Height = 445
Top = 25 Top = 25
Width = 232 Width = 240
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Top = 2 BorderSpacing.Top = 2
BorderSpacing.Right = 8 BorderSpacing.Right = 8
Constraints.MinWidth = 150 Constraints.MinWidth = 150
ItemHeight = 0 ItemHeight = 0
OnSelectionChange = VarListSelectionChange
TabOrder = 0 TabOrder = 0
end end
object ResetBtn: TButton object ResetBtn: TButton
@ -116,12 +117,13 @@ object LatinSpecsFrm: TLatinSpecsFrm
AnchorSideTop.Control = OKBtn AnchorSideTop.Control = OKBtn
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 82 Left = 115
Height = 23 Height = 23
Top = 487 Top = 487
Width = 48 Width = 48
Alignment = taRightJustify Alignment = taRightJustify
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Right = 12
TabOrder = 2 TabOrder = 2
Text = 'nPerCellEdit' Text = 'nPerCellEdit'
end end
@ -143,10 +145,10 @@ object LatinSpecsFrm: TLatinSpecsFrm
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Bevel1 AnchorSideBottom.Control = Bevel1
Left = 248 Left = 256
Height = 440 Height = 440
Top = 25 Top = 25
Width = 164 Width = 156
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Right = 8 BorderSpacing.Right = 8
@ -157,18 +159,18 @@ object LatinSpecsFrm: TLatinSpecsFrm
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 440 ClientHeight = 440
ClientWidth = 164 ClientWidth = 156
TabOrder = 1 TabOrder = 1
object PanelA: TPanel object PanelA: TPanel
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 0 Left = 0
Height = 60 Height = 60
Top = 0 Top = 0
Width = 164 Width = 156
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 60 ClientHeight = 60
ClientWidth = 164 ClientWidth = 156
TabOrder = 0 TabOrder = 0
object ACodeLabel: TLabel object ACodeLabel: TLabel
AnchorSideLeft.Control = ACodeEdit AnchorSideLeft.Control = ACodeEdit
@ -220,10 +222,11 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 37 Left = 37
Height = 23 Height = 23
Top = 25 Top = 25
Width = 127 Width = 119
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
NumbersOnly = True
TabOrder = 2 TabOrder = 2
Text = 'ACodeEdit' Text = 'ACodeEdit'
end end
@ -232,11 +235,11 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 0 Left = 0
Height = 60 Height = 60
Top = 76 Top = 76
Width = 164 Width = 156
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 60 ClientHeight = 60
ClientWidth = 164 ClientWidth = 156
TabOrder = 1 TabOrder = 1
object BCodeLabel: TLabel object BCodeLabel: TLabel
AnchorSideLeft.Control = BCodeEdit AnchorSideLeft.Control = BCodeEdit
@ -289,23 +292,24 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 37 Left = 37
Height = 23 Height = 23
Top = 25 Top = 25
Width = 127 Width = 119
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
NumbersOnly = True
TabOrder = 2 TabOrder = 2
Text = 'Edit1' Text = 'BCodeEdit'
end end
end end
object PanelC: TPanel object PanelC: TPanel
Left = 0 Left = 0
Height = 60 Height = 60
Top = 152 Top = 152
Width = 164 Width = 156
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 60 ClientHeight = 60
ClientWidth = 164 ClientWidth = 156
TabOrder = 2 TabOrder = 2
object CCodeLabel: TLabel object CCodeLabel: TLabel
AnchorSideLeft.Control = CCodeEdit AnchorSideLeft.Control = CCodeEdit
@ -357,33 +361,33 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 37 Left = 37
Height = 23 Height = 23
Top = 25 Top = 25
Width = 127 Width = 119
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
NumbersOnly = True
TabOrder = 2 TabOrder = 2
Text = 'Edit1' Text = 'CCodeEdit'
end end
end end
object PanelD: TPanel object PanelD: TPanel
Left = 0 Left = 0
Height = 60 Height = 60
Top = 228 Top = 228
Width = 164 Width = 156
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 60 ClientHeight = 60
ClientWidth = 164 ClientWidth = 156
TabOrder = 3 TabOrder = 3
object DCodeLabel: TLabel object DCodeLabel: TLabel
AnchorSideLeft.Control = DCodeEdit AnchorSideLeft.Control = DCodeEdit
AnchorSideBottom.Control = DCodeEdit AnchorSideBottom.Control = DCodeEdit
Left = 45 Left = 37
Height = 15 Height = 15
Top = 8 Top = 8
Width = 119 Width = 119
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Bottom = 2 BorderSpacing.Bottom = 2
Caption = 'Factor D Code Variable' Caption = 'Factor D Code Variable'
ParentColor = False ParentColor = False
@ -426,23 +430,24 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 37 Left = 37
Height = 23 Height = 23
Top = 25 Top = 25
Width = 127 Width = 119
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
NumbersOnly = True
TabOrder = 2 TabOrder = 2
Text = 'Edit1' Text = 'DCodeEdit'
end end
end end
object PanelGrp: TPanel object PanelGrp: TPanel
Left = 0 Left = 0
Height = 60 Height = 60
Top = 304 Top = 304
Width = 164 Width = 156
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 60 ClientHeight = 60
ClientWidth = 164 ClientWidth = 156
TabOrder = 4 TabOrder = 4
object GrpCodeLabel: TLabel object GrpCodeLabel: TLabel
AnchorSideLeft.Control = GrpCodeEdit AnchorSideLeft.Control = GrpCodeEdit
@ -494,23 +499,24 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 37 Left = 37
Height = 23 Height = 23
Top = 25 Top = 25
Width = 127 Width = 119
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
NumbersOnly = True
TabOrder = 2 TabOrder = 2
Text = 'Edit1' Text = 'GrpCodeEdit'
end end
end end
object PanelDep: TPanel object PanelDep: TPanel
Left = 0 Left = 0
Height = 60 Height = 60
Top = 380 Top = 380
Width = 164 Width = 156
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 60 ClientHeight = 60
ClientWidth = 164 ClientWidth = 156
TabOrder = 5 TabOrder = 5
object DepVarLabel: TLabel object DepVarLabel: TLabel
AnchorSideLeft.Control = DepVarEdit AnchorSideLeft.Control = DepVarEdit
@ -562,12 +568,13 @@ object LatinSpecsFrm: TLatinSpecsFrm
Left = 37 Left = 37
Height = 23 Height = 23
Top = 25 Top = 25
Width = 127 Width = 119
Anchors = [akLeft, akRight, akBottom] Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Left = 8 BorderSpacing.Left = 8
BorderSpacing.Bottom = 12 BorderSpacing.Bottom = 12
NumbersOnly = True
TabOrder = 2 TabOrder = 2
Text = 'Edit1' Text = 'DepVarEdit'
end end
end end
end end

View File

@ -70,12 +70,15 @@ type
procedure GrpOutBtnClick(Sender: TObject); procedure GrpOutBtnClick(Sender: TObject);
procedure OKBtnClick(Sender: TObject); procedure OKBtnClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject); procedure ResetBtnClick(Sender: TObject);
procedure VarListSelectionChange(Sender: TObject; User: boolean);
private private
{ private declarations } { private declarations }
FAutoSized: Boolean; FAutoSized: Boolean;
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; function Validate(out AMsg: String; out AControl: TWinControl): Boolean;
procedure UpdateBtnStates;
public public
{ public declarations } { public declarations }
procedure PrepareForPlan(APlan: integer);
end; end;
var var
@ -85,17 +88,65 @@ implementation
uses uses
Math, Math,
LatinSqrsUnit; Utils, LatinSqrsUnit;
{ TLatinSpecsFrm } { TLatinSpecsFrm }
procedure TLatinSpecsFrm.ResetBtnClick(Sender: TObject); procedure TLatinSpecsFrm.PrepareForPlan(APlan: Integer);
VAR i : integer;
begin begin
VarList.Clear; ResetBtnClick(nil);
for i := 1 to NoVariables do case APlan of
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]); 1: begin
PanelD.Visible := false;
PanelGrp.Visible := false;
end;
2: begin
PanelD.Visible := true;
PanelGrp.Visible := false;
end;
3: begin
PanelD.Visible := true;
PanelGrp.Visible := false;
end;
4: begin
PanelD.Visible := true;
PanelGrp.Visible := false;
end;
5: begin
PanelD.Visible := false;
PanelGrp.Visible := true;
end;
6: begin
PanelD.Visible := false;
PanelGrp.Visible := true;
end;
7: begin
PanelD.Visible := true;
PanelGrp.Visible := true;
end;
9: begin
PanelD.Visible := true;
PanelGrp.Visible := true;
end;
end;
end;
procedure TLatinSpecsFrm.ResetBtnClick(Sender: TObject);
var
i: integer;
begin
VarList.Clear;
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
ACodeEdit.Text := '';
BCodeEdit.Text := '';
CCodeEdit.Text := '';
DCodeEdit.Text := '';
GrpCodeEdit.Text := '';
DepVarEdit.Text := '';
nPerCellEdit.Text := '';
UpdatebtnStates;
end; end;
procedure TLatinSpecsFrm.FormActivate(Sender: TObject); procedure TLatinSpecsFrm.FormActivate(Sender: TObject);
@ -127,112 +178,142 @@ begin
ResetBtnClick(Self); ResetBtnClick(Self);
end; end;
procedure TLatinSpecsFrm.GrpInBtnClick(Sender: TObject);
VAR index : integer;
begin
index := VarList.ItemIndex;
GrpCodeEdit.Text := VarList.Items.Strings[index];
VarList.Items.Delete(index);
GrpInBtn.Enabled := false;
GrpOutBtn.Enabled := true;
end;
procedure TLatinSpecsFrm.GrpOutBtnClick(Sender: TObject);
begin
VarList.Items.Add(GrpCodeEdit.Text);
GrpCodeEdit.Text := '';
GrpInBtn.Enabled := true;
GrpOutBtn.Enabled := false;
end;
procedure TLatinSpecsFrm.AInBtnClick(Sender: TObject); procedure TLatinSpecsFrm.AInBtnClick(Sender: TObject);
VAR index : integer; var
index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
ACodeEdit.Text := VarList.Items.Strings[index]; if (index > -1) and (ACodeEdit.Text = '') then
VarList.Items.Delete(index); begin
AinBtn.Enabled := false; ACodeEdit.Text := VarList.Items[index];
AOutBtn.Enabled := true; VarList.Items.Delete(index);
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.AOutBtnClick(Sender: TObject); procedure TLatinSpecsFrm.AOutBtnClick(Sender: TObject);
begin begin
VarList.Items.Add(ACodeEdit.Text); if ACodeEdit.Text <> '' then
ACodeEdit.Text := ''; begin
AinBtn.Enabled := true; VarList.Items.Add(ACodeEdit.Text);
AOutBtn.Enabled := false; ACodeEdit.Text := '';
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.BInBtnClick(Sender: TObject); procedure TLatinSpecsFrm.BInBtnClick(Sender: TObject);
VAR index : integer; var
index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
BCodeEdit.Text := VarList.Items.Strings[index]; if (index > -1) and (BCodeEdit.Text = '') then
VarList.Items.Delete(index); begin
BinBtn.Enabled := false; BCodeEdit.Text := VarList.Items[index];
BOutBtn.Enabled := true; VarList.Items.Delete(index);
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.BOutBtnClick(Sender: TObject); procedure TLatinSpecsFrm.BOutBtnClick(Sender: TObject);
begin begin
VarList.Items.Add(BCodeEdit.Text); if BCodeEdit.Text <> '' then
BCodeEdit.Text := ''; begin
BinBtn.Enabled := true; VarList.Items.Add(BCodeEdit.Text);
BOutBtn.Enabled := false; BCodeEdit.Text := '';
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.CInBtnClick(Sender: TObject); procedure TLatinSpecsFrm.CInBtnClick(Sender: TObject);
VAR index : integer; var
index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
CCodeEdit.Text := VarList.Items.Strings[index]; if (index > -1) and (CCodeEdit.Text = '') then
VarList.Items.Delete(index); begin
CinBtn.Enabled := false; CCodeEdit.Text := VarList.Items[index];
COutBtn.Enabled := true; VarList.Items.Delete(index);
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.COutBtnClick(Sender: TObject); procedure TLatinSpecsFrm.COutBtnClick(Sender: TObject);
begin begin
VarList.Items.Add(CCodeEdit.Text); if CCodeEdit.Text <> '' then
CCodeEdit.Text := ''; begin
CinBtn.Enabled := true; VarList.Items.Add(CCodeEdit.Text);
COutBtn.Enabled := false; CCodeEdit.Text := '';
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.DataInBtnClick(Sender: TObject); procedure TLatinSpecsFrm.DataInBtnClick(Sender: TObject);
VAR index : integer; var
index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
DepVarEdit.Text := VarList.Items.Strings[index]; if (index > -1) and (DepVarEdit.Text = '') then
VarList.Items.Delete(index); begin
DataInBtn.Enabled := false; DepVarEdit.Text := VarList.Items[index];
DataOutBtn.Enabled := true; VarList.Items.Delete(index);
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.DataOutBtnClick(Sender: TObject); procedure TLatinSpecsFrm.DataOutBtnClick(Sender: TObject);
begin begin
VarList.Items.Add(DepVarEdit.Text); if DepVarEdit.Text <> '' then
DepVarEdit.Text := ''; begin
DataInBtn.Enabled := true; VarList.Items.Add(DepVarEdit.Text);
DataOutBtn.Enabled := false; DepVarEdit.Text := '';
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.DInBtnClick(Sender: TObject); procedure TLatinSpecsFrm.DInBtnClick(Sender: TObject);
VAR index : integer; var
index: integer;
begin begin
index := VarList.ItemIndex; index := VarList.ItemIndex;
DCodeEdit.Text := VarList.Items.Strings[index]; if (index > -1) and (DCodeEdit.Text = '') then
VarList.Items.Delete(index); begin
DinBtn.Enabled := false; DCodeEdit.Text := VarList.Items[index];
DOutBtn.Enabled := true; VarList.Items.Delete(index);
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.DOutBtnClick(Sender: TObject); procedure TLatinSpecsFrm.DOutBtnClick(Sender: TObject);
begin begin
VarList.Items.Add(DCodeEdit.Text); if DCodeEdit.Text <> '' then
DCodeEdit.Text := ''; begin
DinBtn.Enabled := true; VarList.Items.Add(DCodeEdit.Text);
DOutBtn.Enabled := false; DCodeEdit.Text := '';
UpdateBtnStates;
end;
end;
procedure TLatinSpecsFrm.GrpInBtnClick(Sender: TObject);
var
index: integer;
begin
index := VarList.ItemIndex;
if (index > -1) and (GrpCodeEdit.Text = '') then
begin
GrpCodeEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
UpdateBtnStates;
end;
end;
procedure TLatinSpecsFrm.GrpOutBtnClick(Sender: TObject);
begin
if GrpCodeEdit.Text <> '' then
begin
VarList.Items.Add(GrpCodeEdit.Text);
GrpCodeEdit.Text := '';
UpdateBtnStates;
end;
end; end;
procedure TLatinSpecsFrm.OKBtnClick(Sender: TObject); procedure TLatinSpecsFrm.OKBtnClick(Sender: TObject);
@ -242,29 +323,90 @@ var
begin begin
if not Validate(msg, C) then begin if not Validate(msg, C) then begin
C.SetFocus; C.SetFocus;
MessageDlg(msg, mtError, [mbOK], 0); ErrorMsg(msg);
ModalResult := mrNone; ModalResult := mrNone;
end; end;
end; end;
procedure TLatinSpecsFrm.UpdateBtnStates;
begin
AInBtn.Enabled := (VarList.ItemIndex > -1) and (ACodeEdit.Text = '');
BInBtn.Enabled := (VarList.ItemIndex > -1) and (BCodeEdit.Text = '');
CInBtn.Enabled := (VarList.ItemIndex > -1) and (CCodeEdit.Text = '');
DInBtn.Enabled := (VarList.ItemIndex > -1) and (DCodeEdit.Text = '');
GrpInBtn.Enabled := (VarList.ItemIndex > -1) and (GrpCodeEdit.Text = '');
DataInBtn.Enabled := (VarList.ItemIndex > -1) and (DepVarEdit.Text = '');
AOutBtn.Enabled := (ACodeEdit.Text <> '');
BOutBtn.Enabled := (BCodeEdit.Text <> '');
COutBtn.Enabled := (CCodeEdit.Text <> '');
DOutBtn.Enabled := (DCodeEdit.Text <> '');
GrpOutBtn.Enabled := (GrpCodeEdit.Text <> '');
DataOutBtn.Enabled := (DepVarEdit.Text <> '');
end;
function TLatinSpecsFrm.Validate(out AMsg: String; out AControl: TWinControl): Boolean; function TLatinSpecsFrm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
var var
n: Integer; n: Integer;
begin begin
Result := false; Result := false;
if (nPerCellEdit.Text = '') then begin if (nPerCellEdit.Text = '') then begin
AMsg := 'Please specify the number of cases per cell.'; AMsg := 'Please specify the number of cases per cell.';
AControl := nPercellEdit; AControl := nPercellEdit;
exit; exit;
end; end;
if not TryStrToInt(nPercellEdit.Text, n) or (n <= 0) then begin if not TryStrToInt(nPerCellEdit.Text, n) or (n <= 0) then begin
AMsg := 'Please specify a valid number for the cases per cell.'; AMsg := 'Please specify a valid (positive) number for the cases per cell.';
AControl := nPercellEdit; AControl := nPercellEdit;
exit; exit;
end; end;
if PanelA.Visible and (ACodeEdit.Text = '') then
begin
AMsg := 'Factor A code variable is not specified.';
AControl := ACodeEdit;
exit;
end;
if PanelB.Visible and (BCodeEdit.Text = '') then
begin
AMsg := 'Factor B code variable is not specified.';
Acontrol := BCodeEdit;
exit;
end;
if PanelC.Visible and (CCodeEdit.Text = '') then
begin
AMsg := 'Factor C code variable is not specified.';
Acontrol := CCodeEdit;
exit;
end;
if PanelD.Visible and (DCodeEdit.Text = '') then
begin
AMsg := 'Factor D code variable is not specified.';
Acontrol := DCodeEdit;
exit;
end;
if PanelGrp.Visible and (GrpCodeEdit.Text = '') then
begin
AMsg := 'Group code variable is not specified.';
Acontrol := GrpCodeEdit;
exit;
end;
if PanelDep.Visible and (DepVarEdit.Text = '') then
begin
AMsg := 'Dependent variable is not specified.';
Acontrol := DepVarEdit;
exit;
end;
Result := true; Result := true;
end; end;
procedure TLatinSpecsFrm.VarListSelectionChange(Sender: TObject; User: boolean);
begin
UpdateBtnStates;
end;
initialization initialization
{$I latinspecsunit.lrs} {$I latinspecsunit.lrs}

View File

@ -13,41 +13,40 @@ object LatinSqrsFrm: TLatinSqrsFrm
OnCreate = FormCreate OnCreate = FormCreate
Position = poMainFormCenter Position = poMainFormCenter
LCLVersion = '2.1.0.0' LCLVersion = '2.1.0.0'
object CancelBtn: TButton object ComputeBtn: TButton
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Plan AnchorSideTop.Control = Plan
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = OKBtn AnchorSideRight.Control = CloseBtn
Left = 399 Left = 372
Height = 25 Height = 25
Top = 214 Top = 214
Width = 62 Width = 76
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 12 BorderSpacing.Right = 12
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Caption = 'Cancel' Caption = 'Compute'
ModalResult = 2 OnClick = ComputeBtnClick
TabOrder = 2 TabOrder = 2
end end
object OKBtn: TButton object CloseBtn: TButton
AnchorSideTop.Control = Plan AnchorSideTop.Control = Plan
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 473 Left = 460
Height = 25 Height = 25
Top = 214 Top = 214
Width = 42 Width = 55
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
AutoSize = True AutoSize = True
BorderSpacing.Top = 8 BorderSpacing.Top = 8
BorderSpacing.Right = 8 BorderSpacing.Right = 8
BorderSpacing.Bottom = 8 BorderSpacing.Bottom = 8
Caption = 'OK' Caption = 'Close'
ModalResult = 1 ModalResult = 11
OnClick = OKBtnClick
TabOrder = 3 TabOrder = 3
end end
object Plan: TRadioGroup object Plan: TRadioGroup
@ -84,15 +83,14 @@ object LatinSqrsFrm: TLatinSqrsFrm
'Plan 7. Plan 5 with superimposing of an orthogonal Latin square.' 'Plan 7. Plan 5 with superimposing of an orthogonal Latin square.'
'Plan 9. AxBxC (same square used for all levels of Factor C.)' 'Plan 9. AxBxC (same square used for all levels of Factor C.)'
) )
OnClick = PlanClick
TabOrder = 0 TabOrder = 0
end end
object HelpBtn: TButton object HelpBtn: TButton
Tag = 130 Tag = 130
AnchorSideTop.Control = Plan AnchorSideTop.Control = Plan
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CancelBtn AnchorSideRight.Control = ComputeBtn
Left = 340 Left = 313
Height = 25 Height = 25
Top = 214 Top = 214
Width = 51 Width = 51

View File

@ -67,7 +67,7 @@ var
implementation implementation
uses uses
Math; Math, Utils;
{ TCompareDistFrm } { TCompareDistFrm }
@ -159,7 +159,7 @@ begin
end; end;
if msg <> '' then if msg <> '' then
begin begin
MessageDlg(msg, mtError, [mbOK], 0); ErrorMsg(msg);
exit; exit;
end; end;
@ -360,7 +360,7 @@ begin
max2 := max1; max2 := max1;
if max2 > 13 then if max2 > 13 then
begin begin
MessageDlg('Value > 13 found. Factorial too large - exiting.', mtError, [mbOK], 0); ErrorMsg('Value > 13 found. Factorial too large - exiting.');
exit; exit;
end; end;
for i := 1 to Ncases do for i := 1 to Ncases do

View File

@ -47,7 +47,7 @@ var
implementation implementation
uses uses
Math; Math, Utils;
{ TRelChangeFrm } { TRelChangeFrm }
@ -97,19 +97,19 @@ begin
if (OldRelEdit.Text = '') or not TryStrToFloat(OldRelEdit.Text, oldRel) then if (OldRelEdit.Text = '') or not TryStrToFloat(OldRelEdit.Text, oldRel) then
begin begin
OldRelEdit.SetFocus; OldRelEdit.SetFocus;
MessageDlg('Valid number required.', mtError, [mbOK], 0); ErrorMsg('Valid number required.');
exit; exit;
end; end;
if (OldVarEdit.Text = '') or not TryStrToFloat(OldVarEdit.Text, oldVar) then if (OldVarEdit.Text = '') or not TryStrToFloat(OldVarEdit.Text, oldVar) then
begin begin
OldVarEdit.SetFocus; OldVarEdit.SetFocus;
MessageDlg('Valid number required.', mtError, [mbOK], 0); ErrorMsg('Valid number required.');
exit; exit;
end; end;
if (NewVarEdit.Text = '') or not TryStrToFloat(NewVarEdit.Text, newVar) then if (NewVarEdit.Text = '') or not TryStrToFloat(NewVarEdit.Text, newVar) then
begin begin
NewVarEdit.SetFocus; NewVarEdit.SetFocus;
MessageDlg('Valid number required.', mtError, [mbOK], 0); ErrorMsg('Valid number required.');
exit; exit;
end; end;
newRel := 1.0 - (oldVar / newVar) * (1.0 - oldRel); newRel := 1.0 - (oldVar / newVar) * (1.0 - oldRel);

View File

@ -52,7 +52,7 @@ var
implementation implementation
uses uses
Math; Math, Utils;
{ TSuccIntFrm } { TSuccIntFrm }
@ -127,7 +127,7 @@ var
begin begin
if ItemList.Items.Count = 0 then if ItemList.Items.Count = 0 then
begin begin
MessageDlg('No variables selected.', mtError, [mbOK], 0); ErrorMsg('No variables selected.');
exit; exit;
end; end;

View File

@ -992,33 +992,33 @@ object OS3MainFrm: TOS3MainFrm
OnClick = ProbltzClick OnClick = ProbltzClick
end end
object probzbetween: TMenuItem object probzbetween: TMenuItem
Caption = 'Prob between 2 z values' Caption = 'Probability between two z Values'
OnClick = probzbetweenClick OnClick = probzbetweenClick
end end
object MenuItem45: TMenuItem object MenuItem45: TMenuItem
Caption = '-' Caption = '-'
end end
object inversez: TMenuItem object inversez: TMenuItem
Caption = 'z for a given cum. Probability' Caption = 'z for a given Cumulative Probability'
OnClick = inversezClick OnClick = inversezClick
end end
object MenuItem44: TMenuItem object MenuItem44: TMenuItem
Caption = '-' Caption = '-'
end end
object Chiprob: TMenuItem object Chiprob: TMenuItem
Caption = 'Chisquare Probability' Caption = 'Chi-Square Probability'
OnClick = ChiprobClick OnClick = ChiprobClick
end end
object tprob: TMenuItem object tprob: TMenuItem
Caption = 'Student t probability' Caption = 'Student t Probability'
OnClick = tprobClick OnClick = tprobClick
end end
object Fprob: TMenuItem object Fprob: TMenuItem
Caption = 'F probability' Caption = 'F Probability'
OnClick = FprobClick OnClick = FprobClick
end end
object HypergeoProb: TMenuItem object HypergeoProb: TMenuItem
Caption = 'Hypergeometric probability' Caption = 'Hypergeometric Probability'
OnClick = HypergeoProbClick OnClick = HypergeoProbClick
end end
end end

View File

@ -453,6 +453,7 @@ implementation
{ TOS3MainFrm } { TOS3MainFrm }
uses uses
Utils,
OptionsUnit, OutputUnit, LicenseUnit, TransFrmUnit, DescriptiveUnit, OptionsUnit, OutputUnit, LicenseUnit, TransFrmUnit, DescriptiveUnit,
FreqUnit, CrossTabUnit, BreakDownUnit, BoxPlotUnit, NormalityUnit, Rot3DUnit, FreqUnit, CrossTabUnit, BreakDownUnit, BoxPlotUnit, NormalityUnit, Rot3DUnit,
PlotXYUnit, BubblePlotUnit, StemLeafUnit, MultXvsYUnit, OneSampUnit, PlotXYUnit, BubblePlotUnit, StemLeafUnit, MultXvsYUnit, OneSampUnit,
@ -1163,17 +1164,16 @@ end;
// Menu "Variables" > "Transform Variables" // Menu "Variables" > "Transform Variables"
procedure TOS3MainFrm.TransformClick(Sender: TObject); procedure TOS3MainFrm.TransformClick(Sender: TObject);
var var
MyErrorString : string; err: string;
begin begin
try try
if TransFrm = nil then if TransFrm = nil then
Application.CreateForm(TTransFrm, TransFrm); Application.CreateForm(TTransFrm, TransFrm);
TransFrm.ShowModal; TransFrm.ShowModal;
except except
// MyErrorString := 'ErrorCode: ' + IntToStr(Error) + #13#10; err := 'Error in showing transformations';
MyErrorString := 'Error in showing transformations'; ErrorMsg(err);
MessageDlg(MyErrorString , mtError, [mbOk], 0); end;
end;
end; end;
// Menu "Analysis" > "Comparisons" > "t-tests" // Menu "Analysis" > "Comparisons" > "t-tests"
@ -1722,7 +1722,7 @@ begin
if TryStrToInt(response, GroupCol) and (GroupCol > 0) then if TryStrToInt(response, GroupCol) and (GroupCol > 0) then
break break
else else
MessageDlg('Illegal value entered for index of group column.', mtError, [mbOk], 0); ErrorMsg('Illegal value entered for index of group column.');
until false; until false;
response := '2'; response := '2';
@ -1732,7 +1732,7 @@ begin
if TryStrToInt(response, VarCol) then if TryStrToInt(response, VarCol) then
break break
else else
MessageDlg('Illegal value entered for index of variable column.', mtError, [mbOK], 0); ErrorMsg('Illegal value entered for index of variable column.');
until false; until false;
NoCases := StrToInt(NoCasesEdit.text); NoCases := StrToInt(NoCasesEdit.text);

View File

@ -5,10 +5,12 @@ unit Utils;
interface interface
uses uses
Classes, SysUtils, StdCtrls; Classes, SysUtils, StdCtrls, Dialogs;
function AnySelected(AListbox: TListBox): Boolean; function AnySelected(AListbox: TListBox): Boolean;
procedure ErrorMsg(const AMsg: String);
procedure Exchange(var a, b: Double); overload; procedure Exchange(var a, b: Double); overload;
procedure Exchange(var a, b: Integer); overload; procedure Exchange(var a, b: Integer); overload;
procedure Exchange(var a, b: String); overload; procedure Exchange(var a, b: String); overload;
@ -28,6 +30,11 @@ begin
end; end;
end; end;
procedure ErrorMsg(const AMsg: String);
begin
MessageDlg(AMsg, mtError, [mbOK], 0);
end;
procedure Exchange(var a, b: Double); procedure Exchange(var a, b: Double);
var var
tmp: Double; tmp: Double;