September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -1,13 +0,0 @@
|
|||
PROCtestobjects
|
||||
END
|
||||
|
||||
DEF PROCtestobjects
|
||||
PRIVATE a(), b(), s{}, t{}
|
||||
DIM a(123)
|
||||
DIM s{a%, b#, c$}
|
||||
|
||||
IF !^a() <= 1 PRINT "a() is null" ELSE PRINT "a() is not null"
|
||||
IF !^b() <= 1 PRINT "b() is null" ELSE PRINT "b() is not null"
|
||||
IF !^s{} <= 1 PRINT "s{} is null" ELSE PRINT "s{} is not null"
|
||||
IF !^t{} <= 1 PRINT "t{} is null" ELSE PRINT "t{} is not null"
|
||||
ENDPROC
|
||||
9
Task/Null-object/Kotlin/null-object.kotlin
Normal file
9
Task/Null-object/Kotlin/null-object.kotlin
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// version 1.1.0
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val i: Int = 3 // non-nullable Int type - can't be assigned null
|
||||
println(i)
|
||||
val j: Int? = null // nullable Int type - can be assigned null
|
||||
println(j)
|
||||
println(null is Nothing?) // test that null is indeed of type Nothing?
|
||||
}
|
||||
1
Task/Null-object/OoRexx/null-object-1.rexx
Normal file
1
Task/Null-object/OoRexx/null-object-1.rexx
Normal file
|
|
@ -0,0 +1 @@
|
|||
if a[i] == .nil then say "Item" i "is missing"
|
||||
5
Task/Null-object/OoRexx/null-object-2.rexx
Normal file
5
Task/Null-object/OoRexx/null-object-2.rexx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
a=.array~of('A','B')
|
||||
i=3
|
||||
if a[i] == .nil then say "Item" i "of array A is missing"
|
||||
if \var("INPUT") then say "Variable INPUT is not assigned"
|
||||
if \var("var") then say "Variable" var "is not assigned"
|
||||
4
Task/Null-object/S-lang/null-object.slang
Normal file
4
Task/Null-object/S-lang/null-object.slang
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
variable foo = NULL;
|
||||
print(foo);
|
||||
if (foo == NULL)
|
||||
print(typeof(foo));
|
||||
2
Task/Null-object/Zkl/null-object.zkl
Normal file
2
Task/Null-object/Zkl/null-object.zkl
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
if(Void == n) ...
|
||||
return(Void)
|
||||
Loading…
Add table
Add a link
Reference in a new issue