-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest.pas
More file actions
66 lines (54 loc) · 1.02 KB
/
test.pas
File metadata and controls
66 lines (54 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
program test;
(* JCF CLI test file *)
uses CRT;
procedure myProcedure;
var s: String;
begin
s := 'this is a string';
writeln(s);
end;
function myFunction(aParam: string): boolean;
var i: integer;
begin
for i := 1 to 10 do
if i < 10 then write(i, ',')
else writeln(i);
i := 1;
repeat
case i of
1..9:
for i := 1 to i do write(i, ',');
10: begin
writeln;
writeln;
end;
else
myProcedure;
end;
until i >= 10;
result := true;
end;
//# main program
var
c, r: Integer;
s: String;
a: Array of Integer;
BEGIN
//! clear first
ClrScr;
SetLength(a, 10);
FOR c := 0 TO High(a) DO
a[c] := c;
FOR c := 0 TO High(a) DO
IF i < High(a) THEN write(a[c], ',')
ELSE writeln;
c := ScreenWidth; //* screen size
r := ScreenHeight;
s := 'Screen size: ';
writeln(s, c, '×', r);
write('Enter your name: '); //? input
readln(s);
writeln('Hello, ', s, '!'); //+ forgotten
//-readln; // unnecessary
// TODO: to-do next
END.