Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
21
Task/Generic-swap/NetRexx/generic-swap.netrexx
Normal file
21
Task/Generic-swap/NetRexx/generic-swap.netrexx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols nobinary
|
||||
|
||||
-- Simple values with no spaces can be swapped without the use of a parse template
|
||||
lval = 27
|
||||
rval = 5
|
||||
say 'Before - <lval>'lval'</lval> <rval>'rval'</rval>'
|
||||
parse (lval rval) rval lval
|
||||
say 'After - <lval>'lval'</lval> <rval>'rval'</rval>'
|
||||
say
|
||||
|
||||
-- More complex data needs to use some form of parsing template
|
||||
lval = 'This value started on the left'
|
||||
rval = 'This value started on the right'
|
||||
dlm = 12x80facebead01 -- some delimiting value that is unlikely to occur in the LVAL to be swapped
|
||||
say 'Before - <lval>'lval'</lval> <rval>'rval'</rval>'
|
||||
parse (lval || dlm || rval) rval (dlm) lval
|
||||
say 'After - <lval>'lval'</lval> <rval>'rval'</rval>'
|
||||
say
|
||||
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue