-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix to support non-local access with PCALL
- Loading branch information
Rochus Keller
committed
May 15, 2022
1 parent
f1ddf7c
commit 1873061
Showing
3 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3378,7 +3378,7 @@ int main(int argc, char *argv[]) | |
a.setOrganizationName("[email protected]"); | ||
a.setOrganizationDomain("github.com/rochus-keller/Oberon"); | ||
a.setApplicationName("Oberon+ IDE (Mono)"); | ||
a.setApplicationVersion("0.9.71"); | ||
a.setApplicationVersion("0.9.72"); | ||
a.setStyle("Fusion"); | ||
QFontDatabase::addApplicationFont(":/font/DejaVuSansMono.ttf"); // "DejaVu Sans Mono" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,37 @@ | ||
module Pcall2 | ||
type Exception = record end | ||
proc Print(IN str: array of char) | ||
var e: pointer to Exception | ||
|
||
proc Sub() | ||
type Exception = record end | ||
|
||
proc Print(IN str: array of char) | ||
var e: pointer to Exception | ||
begin | ||
i := 33 | ||
println(str) | ||
new(e) | ||
raise(e) | ||
println("this should not be printed") | ||
end Print | ||
|
||
var | ||
res: pointer to anyrec | ||
i: integer | ||
|
||
begin | ||
println(str) | ||
new(e) | ||
raise(e) | ||
println("this is printed") | ||
end Print | ||
var | ||
res: pointer to anyrec | ||
i := 22 | ||
pcall(res, Print, "Hello World") | ||
case res of | ||
| Exception: println("got Exception") | ||
| anyrec: println("got anyrec") | ||
| nil: println("all ok") | ||
else | ||
println("unknown exception") | ||
end | ||
println(i) // CLR prints 33, C prints 22 | ||
end Sub | ||
|
||
begin | ||
pcall(res, Print, "Hello World") | ||
case res of | ||
| Exception: println("got Exception") | ||
| anyrec: println("got anyrec") | ||
else | ||
println("no or unknown exception") | ||
end | ||
|
||
Sub(); | ||
|
||
end Pcall2 |