Skip to content

Commit

Permalink
fix \n => \r\n in pascal files
Browse files Browse the repository at this point in the history
  • Loading branch information
SunSerega committed Apr 22, 2024
1 parent cc3e861 commit bb7ba8e
Show file tree
Hide file tree
Showing 14 changed files with 135 additions and 135 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## uses OpenCLABC;

var C := CQ(5);

CLContext.Default.SyncInvoke(
CombineConvAsyncQueue(a->a, |C,C.ThenConvert(x->x*x, false)|, false).Print
## uses OpenCLABC;

var C := CQ(5);

CLContext.Default.SyncInvoke(
CombineConvAsyncQueue(a->a, |C,C.ThenConvert(x->x*x, false)|, false).Print
).Println;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## uses OpenCLABC;

var P := new ParameterQueue<integer>('P');

CLContext.Default.SyncInvoke(
CombineConvAsyncQueue(a->a, |P,P.ThenConvert(x->x*x, false)|, false),
## uses OpenCLABC;

var P := new ParameterQueue<integer>('P');

CLContext.Default.SyncInvoke(
CombineConvAsyncQueue(a->a, |P,P.ThenConvert(x->x*x, false)|, false),
P.NewSetter(5)).Println;
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
## uses OpenCLABC;

procedure Test(q: CommandQueue<integer>);
begin
q.Print;

('-'*30).Println;
CLContext.Default.SyncInvoke(q
.ThenUse(x->Println(x))
.ThenConvert(x->(x*x).Println)
.ThenUse(x->Println(x))
);

('-'*30).Println;
CLContext.Default.SyncInvoke(q
.ThenUse(x->Println(x), false)
.ThenConvert(x->(x*x).Println, false)
.ThenUse(x->Println(x+1), false)
);

('='*30).Println;
end;

Test(2);
Test(HFQ(()->3));
## uses OpenCLABC;

procedure Test(q: CommandQueue<integer>);
begin
q.Print;

('-'*30).Println;
CLContext.Default.SyncInvoke(q
.ThenUse(x->Println(x))
.ThenConvert(x->(x*x).Println)
.ThenUse(x->Println(x))
);

('-'*30).Println;
CLContext.Default.SyncInvoke(q
.ThenUse(x->Println(x), false)
.ThenConvert(x->(x*x).Println, false)
.ThenUse(x->Println(x+1), false)
);

('='*30).Println;
end;

Test(2);
Test(HFQ(()->3));
Test(HFQ(()->4 as object).Cast&<integer>);
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## uses OpenCLABC;

var Q := HFQ(()->123).Multiusable;
CLContext.Default.SyncInvoke(
Q.DiscardResult
// CombineConvAsyncQueueN2((a,b)->(a,b), Q, Q, false)
// Q*Q
// Q.ThenUse(x->Println(x), false)*Q
);//.Println;
## uses OpenCLABC;

var Q := HFQ(()->123).Multiusable;
CLContext.Default.SyncInvoke(
Q.DiscardResult
// CombineConvAsyncQueueN2((a,b)->(a,b), Q, Q, false)
// Q*Q
// Q.ThenUse(x->Println(x), false)*Q
);//.Println;
//EventDebug.ReportEventLogs;
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## uses OpenCLABC;

var wh := new System.Threading.ManualResetEventSlim(false);
var Q := (HPQ(wh.Wait)+HFQ(()->123)).Multiusable;
var t := CLContext.Default.BeginInvoke(
Q *
Q.ThenUse(x->Println(x))
);
wh.Set;
## uses OpenCLABC;

var wh := new System.Threading.ManualResetEventSlim(false);
var Q := (HPQ(wh.Wait)+HFQ(()->123)).Multiusable;
var t := CLContext.Default.BeginInvoke(
Q *
Q.ThenUse(x->Println(x))
);
wh.Set;
t.Wait;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## uses OpenCLABC;

var Q := HFQ(()->(1).Println+1, false).Multiusable;
## uses OpenCLABC;

var Q := HFQ(()->(1).Println+1, false).Multiusable;
CLContext.Default.SyncInvoke(CombineConvSyncQueue(a->a, |Q,Q|, false,true).Println).Println;
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
## uses OpenCLABC;

var a := new CLArray<integer>(1);
var wh := new System.Threading.ManualResetEventSlim(false);
CLContext.Default.SyncInvoke(
(
HPQ(()->
begin
wh.Wait;
$'HPQ+1'.Println;
raise new Exception('TestOK+1');
end) +
CQ(a)
).MakeCCQ.ThenWriteValue(0, HFQ(()->
begin
Result := 0;
$'HFQ+2'.Println;
wh.Set;
raise new Exception('TestOK+2');
end))
.HandleWithoutRes(e->e.Message.Println <> nil)
);
a.Dispose;
## uses OpenCLABC;

var a := new CLArray<integer>(1);
var wh := new System.Threading.ManualResetEventSlim(false);
CLContext.Default.SyncInvoke(
(
HPQ(()->
begin
wh.Wait;
$'HPQ+1'.Println;
raise new Exception('TestOK+1');
end) +
CQ(a)
).MakeCCQ.ThenWriteValue(0, HFQ(()->
begin
Result := 0;
$'HFQ+2'.Println;
wh.Set;
raise new Exception('TestOK+2');
end))
.HandleWithoutRes(e->e.Message.Println <> nil)
);
a.Dispose;
$'Expect 3 evs: HPQ + HFQ + async enq'.Println;
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## uses OpenCLABC;

var a := new CLArray<integer>(1);
var wh := new System.Threading.ManualResetEventSlim(false);
var t := CLContext.Default.BeginInvoke(
(HPQ(wh.Wait) + CQ(a)).MakeCCQ.ThenWriteArray(HFQ(()->nil as array of integer, false))
.HandleWithoutRes(e->TypeName(e).Println <> nil)
);
wh.Set;
t.Wait;
## uses OpenCLABC;

var a := new CLArray<integer>(1);
var wh := new System.Threading.ManualResetEventSlim(false);
var t := CLContext.Default.BeginInvoke(
(HPQ(wh.Wait) + CQ(a)).MakeCCQ.ThenWriteArray(HFQ(()->nil as array of integer, false))
.HandleWithoutRes(e->TypeName(e).Println <> nil)
);
wh.Set;
t.Wait;
a.Dispose;
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## uses OpenCLABC;

CLContext.Default.SyncInvoke(
CLMemoryCCQ.Create(HFQ(()->new CLMemory(1))).ThenWriteArray1(HFQ(()->
begin
Result := new byte[0];
raise new Exception('TestOK');
end, false))
## uses OpenCLABC;

CLContext.Default.SyncInvoke(
CLMemoryCCQ.Create(HFQ(()->new CLMemory(1))).ThenWriteArray1(HFQ(()->
begin
Result := new byte[0];
raise new Exception('TestOK');
end, false))
);
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## uses OpenCLABC;

CLContext.Default.SyncInvoke(
(
HPQ(()->raise new Exception('TestOK'), need_own_thread:=false) +
HPQ(()->raise new Exception('TestError'), need_own_thread:=false)
).HandleWithoutRes(e->e.Message.Println <> nil)
## uses OpenCLABC;

CLContext.Default.SyncInvoke(
(
HPQ(()->raise new Exception('TestOK'), need_own_thread:=false) +
HPQ(()->raise new Exception('TestError'), need_own_thread:=false)
).HandleWithoutRes(e->e.Message.Println <> nil)
);
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
## uses OpenCLABC;

var M := WaitMarker.Create;

var mre := new System.Threading.ManualResetEventSlim(false);
CLContext.Default.SyncInvoke(
HPQ(()->
begin
mre.Wait;
'M'.Println;
M.SendSignal;
end) *
HFQ(()->5).ThenUse(x->
begin
$'/\{x}/\'.Println;
mre.Set;
end, false).ThenWaitFor(M)
## uses OpenCLABC;

var M := WaitMarker.Create;

var mre := new System.Threading.ManualResetEventSlim(false);
CLContext.Default.SyncInvoke(
HPQ(()->
begin
mre.Wait;
'M'.Println;
M.SendSignal;
end) *
HFQ(()->5).ThenUse(x->
begin
$'/\{x}/\'.Println;
mre.Set;
end, false).ThenWaitFor(M)
).Println;
6 changes: 3 additions & 3 deletions Tests/Exec/CLABC/03#ToString/02#Parameter/1.pas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## uses OpenCLABC;

Write(new ParameterQueue<byte>('P1', 1));
## uses OpenCLABC;

Write(new ParameterQueue<byte>('P1', 1));
Write(new ParameterQueue<object>('P2', 2));
4 changes: 2 additions & 2 deletions Tests/Exec/CLABC/03#ToString/03#Cast/typed nil.pas
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## uses OpenCLABC;

## uses OpenCLABC;

HPQ(()->begin end).Cast&<Exception>.Print;
14 changes: 7 additions & 7 deletions Tests/Exec/CLABC/03#ToString/11#Finally+Handle/1.pas
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## uses OpenCLABC;

var Q := HFQ(()->1);

(Q >= Q).Println;
Q.HandleWithoutRes(e->true).Println;
Q.HandleDefaultRes(e->true, 2).Println;
## uses OpenCLABC;

var Q := HFQ(()->1);

(Q >= Q).Println;
Q.HandleWithoutRes(e->true).Println;
Q.HandleDefaultRes(e->true, 2).Println;
Q.HandleReplaceRes(lst->3).Println;

0 comments on commit bb7ba8e

Please sign in to comment.