Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
17
Task/Null-object/Phix/null-object.phix
Normal file
17
Task/Null-object/Phix/null-object.phix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
type nullableString(object o)
|
||||
return string(o) or o=NULL
|
||||
end type
|
||||
nullableString s
|
||||
s = "hello"
|
||||
s = NULL
|
||||
--s = 1 -- error
|
||||
--s = {1,2,3} -- error
|
||||
|
||||
type nullableSequence(object o)
|
||||
return sequence(o) or o=NULL
|
||||
end type
|
||||
nullableSequence q
|
||||
q = {1,2,3}
|
||||
q = "string" -- fine (strings are a subset of sequences)
|
||||
q = NULL
|
||||
--q = 1 -- error
|
||||
Loading…
Add table
Add a link
Reference in a new issue