UV's CHANGE or EREPLACE are synonyms:

   EREPLACE(expression, substring, replacement [,occurrence [,begin] ] )
   CHANGE  (expression, substring, replacement [,occurrence [,begin] ] )

which pretty much mimic ED's "C"hange command or Pick Editor's "R"eplace.


UV's SWAP is different:
  "SWAP variable1, variable2
   SWAP MAT variable1, MAT variable2

The SWAP statement interchanges the values in the variables you specify. variable can be any valid variable, for example, integers, numbers, characters, and so forth."

Swap is handy for things like this:

SWAP REC.A, REC.TO.PROCESS ; GOSUB PROCESS.REC ; SWAP REC.A, REC.TO.PROCESS SWAP REC.B, REC.TO.PROCESS ; GOSUB PROCESS.REC ; SWAP REC.B, REC.TO.PROCESS

It is also cheap, because no actual data is moved in memory, just pointers to the strings exchanged in memory.

Others have discussed "CONVERT".

cds

On 4/25/2012 7:07 PM, Tony Gravagno wrote:
I don't recall about which platforms this applies, but CONVERT is used to change a single character. CHANGE or SWAP (depending on platform) changes multiple chars: CONVERT SINGLE1 TO SINGLE2 IN VAR VAR = CHANGE(VAR,MULTI1,MULTI2) VAR = SWAP(VAR,MULTI1,MULTI2)

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to