Named parameters: Difference between revisions

Added Arturo implementation
(→‎{{header|ALGOL 68}}: Changes for recent Algol 68G and allow runnning with a wider range of compilers)
(Added Arturo implementation)
Line 167:
]FIRST$ = "JOHN" : LAST$ = "DOE" : GOSUB 100"PRINT NAME
DOE, JOHN</pre>
 
=={{header|Arturo}}==
 
<lang rebol>func: function [x][
print ["argument x:" x]
print ["attribute foo:" attr 'foo]
print ["attribute bar:" attr 'bar]
print ""
]
 
func 1
func .foo:"foo" 2
func .bar:"bar" 3
func .foo:123 .bar:124 4
func .bar:124 .foo:123 5</lang>
 
{{out}}
 
<pre>argument x: 1
attribute foo: null
attribute bar: null
 
argument x: 2
attribute foo: foo
attribute bar: null
 
argument x: 3
attribute foo: null
attribute bar: bar
 
argument x: 4
attribute foo: 123
attribute bar: 124
 
argument x: 5
attribute foo: 123
attribute bar: 124</pre>
 
=={{header|AutoHotkey}}==
1,532

edits