mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 03:26:14 +02:00
+ Added examples 60,61
This commit is contained in:
parent
72076e2e89
commit
cea4083b7d
@ -36,8 +36,8 @@ OBJECTS=ex1 ex2 ex3 ex4 ex5 ex6 ex7 ex8 ex9 ex10 ex11 ex12 ex13 ex14 \
|
||||
ex15 ex16 ex17 ex18 ex19 ex20 ex21 ex22 ex23 ex24 ex25 ex26 ex27 \
|
||||
ex28 ex29 ex30 ex31 ex32 ex33 ex34 ex35 ex36 ex37 ex38 ex39 ex40 \
|
||||
ex41 ex42 ex43 ex44 ex45 ex46 ex47 ex48 ex49 ex51 ex52 ex53 ex54 ex55 \
|
||||
ex56 ex57 ex58 ex59
|
||||
# ex60 ex61 ex62 ex63 ex64 ex65 ex66 \
|
||||
ex56 ex57 ex58 ex59 ex60 ex61
|
||||
# ex62 ex63 ex64 ex65 ex66 \
|
||||
# ex67 ex68 ex69 ex70 ex71 ex72 ex73 ex74 ex75 ex76 ex77
|
||||
|
||||
TEXOBJECTS=$(addsuffix .tex, $(OBJECTS))
|
||||
|
@ -59,4 +59,7 @@ ex55.pp contains an example of the TCGetAttr,TCSetAttr,CFMakeRaw functions.
|
||||
ex56.pp contains an example of the Shell function.
|
||||
ex57.pp contains an example of the SigAction function.
|
||||
ex58.pp contains an example of the Signal function.
|
||||
serial.pp contains an example of serial port programming in FPC.ex59.pp contains an example of the alarm function.
|
||||
ex59.pp contains an example of the Alarm function.
|
||||
ex60.pp contains an example of the GetDateTime function.
|
||||
serial.pp contains an example of serial port programming in FPC.
|
||||
ex61.pp contains an example of the CreateShellArgV function.
|
||||
|
13
docs/linuxex/ex60.pp
Normal file
13
docs/linuxex/ex60.pp
Normal file
@ -0,0 +1,13 @@
|
||||
Program Example6;
|
||||
|
||||
{ Program to demonstrate the GetDateTime function. }
|
||||
|
||||
Uses linux;
|
||||
|
||||
Var Year, Month, Day, Hour, min, sec : Word;
|
||||
|
||||
begin
|
||||
GetDateTime (Year, Month, Day, Hour, min, sec);
|
||||
Writeln ('Date : ',Day:2,'/',Month:2,'/',Year:4);
|
||||
Writeln ('Time : ',Hour:2,':',Min:2,':',Sec:2);
|
||||
end.
|
22
docs/linuxex/ex61.pp
Normal file
22
docs/linuxex/ex61.pp
Normal file
@ -0,0 +1,22 @@
|
||||
Program ex61;
|
||||
|
||||
{ Example program to demonstrate the CreateShellArgV function }
|
||||
|
||||
uses linux;
|
||||
|
||||
Var
|
||||
S: String;
|
||||
PP : PPchar;
|
||||
I : longint;
|
||||
|
||||
begin
|
||||
S:='script -a -b -c -d -e fghijk';
|
||||
PP:=CreateShellArgV(S);
|
||||
I:=0;
|
||||
If PP<>Nil then
|
||||
While PP[i]<>Nil do
|
||||
begin
|
||||
Writeln ('Got : "',PP[i],'"');
|
||||
Inc(i);
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user