-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathYES.PAS
39 lines (36 loc) · 874 Bytes
/
YES.PAS
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
{ @author: Sylvain Maltais ([email protected])
@created: 2024
@website(https://www.gladir.com/linux-0)
@abstract(Target: Turbo Pascal 7, Free Pascal 3.2)
}
Program YES;
Var
S:String;
I:Integer;
BEGIN
If(ParamStr(1)='/?')or(ParamStr(1)='--help')or(ParamStr(1)='-h')or
(ParamStr(1)='/h')or(ParamStr(1)='/H')Then Begin
WriteLn('YES : Cette commande permet d''effectuer des r‚p‚titions de r‚ponses ',
'affirmatives.');
WriteLn;
WriteLn('Syntaxe : YES [string]');
WriteLn;
WriteLn(' string Permet d''indiquer la r‚ponse … retourner continuellement.');
WriteLn;
End
Else
Begin
S:='';
If ParamCount>0 Then Begin
For I:=1 to ParamCount do Begin
If S<>''Then S:=S+' ';
S:=S+ParamStr(I);
End;
End;
If S=''Then S:='y';
While True do Begin
{$I-}WriteLn(S);{$I+}
If IOResult<>0 Then Break;
End;
End;
END.