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
9
Task/Named-parameters/Phix/named-parameters.phix
Normal file
9
Task/Named-parameters/Phix/named-parameters.phix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
global function timedelta(atom weeks=0, atom days=0, atom hours=0, atom minutes=0, atom seconds=0, atom milliseconds=0, atom microseconds=0)
|
||||
-- can be invoked as:
|
||||
constant fourdays = timedelta(days:=4)
|
||||
-- fourdays = timedelta(0,4) -- equivalent
|
||||
-- **NB** a plain '=' is a very different thing
|
||||
constant oneday = timedelta(days=1) -- equivalent to timedelta([weeks:=]iff((equal(days,1)?true:false))
|
||||
-- - with an error if no local variable days exists.
|
||||
constant shift = timedelta(hours:=hours) -- perfectly valid (param hours:=local hours)
|
||||
-- timedelta(0,hours:=15,3) -- illegal (it is not clear whether you meant days:=3 or minutes:=3)
|
||||
Loading…
Add table
Add a link
Reference in a new issue