Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Generic-swap/OxygenBasic/generic-swap.basic
Normal file
16
Task/Generic-swap/OxygenBasic/generic-swap.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
macro Swap(a,b, c)
|
||||
typeof(a) c
|
||||
c=a
|
||||
a=b
|
||||
b=c
|
||||
end macro
|
||||
|
||||
|
||||
'demo with compound types:
|
||||
'=========================
|
||||
type point { float x,y}
|
||||
point p={1,2}
|
||||
point q={3,4}
|
||||
swap p,q
|
||||
print "p: " p.x "," p.y 'p: 3,4
|
||||
print "q: " q.x "," q.y 'q: 1,2
|
||||
Loading…
Add table
Add a link
Reference in a new issue