March 2014 update
This commit is contained in:
parent
09687c4926
commit
a25938f123
1846 changed files with 21876 additions and 5203 deletions
|
|
@ -1,6 +1,6 @@
|
|||
a = 'some value'
|
||||
b = 6
|
||||
a = 'I see you.'
|
||||
b = -6
|
||||
|
||||
_temp_ = a
|
||||
a = b
|
||||
b = _temp_
|
||||
_temp_ = a /*swap ··· */
|
||||
a = b /* A ··· */
|
||||
b = _temp_ /* and B */
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
a = -199e-12
|
||||
b = 12.
|
||||
a = "bull feathers"
|
||||
b = 10
|
||||
|
||||
parse value a b with b a /*swaps A and B */
|
||||
a=value('b', a) /*swap A and B */
|
||||
|
|
|
|||
4
Task/Generic-swap/REXX/generic-swap-3.rexx
Normal file
4
Task/Generic-swap/REXX/generic-swap-3.rexx
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
a = -199e-12
|
||||
b = 12.
|
||||
|
||||
parse value a b with b a /*swap A and B */
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
set a 1
|
||||
set b 2
|
||||
puts "before\ta=$a\tb=$b"
|
||||
swap a b
|
||||
puts "after\ta=$a\tb=$b"
|
||||
proc swap {aName bName} {
|
||||
upvar 1 $aName a $bName b
|
||||
set a $b[set b $a; list]
|
||||
}
|
||||
|
|
|
|||
5
Task/Generic-swap/Tcl/generic-swap-4.tcl
Normal file
5
Task/Generic-swap/Tcl/generic-swap-4.tcl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
set a 1
|
||||
set b 2
|
||||
puts "before\ta=$a\tb=$b"
|
||||
swap a b
|
||||
puts "after\ta=$a\tb=$b"
|
||||
Loading…
Add table
Add a link
Reference in a new issue