Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,5 +0,0 @@
|
|||
with Ada.Text_Io;
|
||||
|
||||
if Object = null then
|
||||
Ada.Text_Io.Put_line("object is null");
|
||||
end if;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
Local $object = Null
|
||||
If $object = Null Then MsgBox(0, "NULL", "Object is null")
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
identification division.
|
||||
program-id. null-objects.
|
||||
remarks. test with cobc -x -j null-objects.cob
|
||||
|
||||
data division.
|
||||
working-storage section.
|
||||
01 thing-not-thing usage pointer.
|
||||
|
||||
*> call a subprogram
|
||||
*> with one null pointer
|
||||
*> an omitted parameter
|
||||
*> and expect void return (callee returning omitted)
|
||||
*> and do not touch default return-code (returning nothing)
|
||||
procedure division.
|
||||
call "test-null" using thing-not-thing omitted returning nothing
|
||||
goback.
|
||||
end program null-objects.
|
||||
|
||||
*> Test for pointer to null (still a real thing that takes space)
|
||||
*> and an omitted parameter, (call frame has placeholder)
|
||||
*> and finally, return void, (omitted)
|
||||
identification division.
|
||||
program-id. test-null.
|
||||
|
||||
data division.
|
||||
linkage section.
|
||||
01 thing-one usage pointer.
|
||||
01 thing-two pic x.
|
||||
|
||||
procedure division using
|
||||
thing-one
|
||||
optional thing-two
|
||||
returning omitted.
|
||||
|
||||
if thing-one equal null then
|
||||
display "thing-one pointer to null" upon syserr
|
||||
end-if
|
||||
|
||||
if thing-two omitted then
|
||||
display "no thing-two was passed" upon syserr
|
||||
end-if
|
||||
goback.
|
||||
end program test-null.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
class C { };
|
||||
var c : owned C?; // is nil
|
||||
writeln(if c == nil then "nil" else "something");
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
if ($null -eq $object) {
|
||||
...
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
x: none
|
||||
|
||||
print ["x" either none? x ["is"]["isn't"] "none."]
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
unset? get/any 'some-var
|
||||
unset? get 'some-var
|
||||
Loading…
Add table
Add a link
Reference in a new issue