Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: Function Index > S

SMOVE

Scroll Prev Top Next More

(SMOVE(text,pos1,nchar,string,pos2))

 

From text, starting at position pos1, moves nchar characters to string starting at position pos2.

 

In the example below, the value of vsmove1 is XBCDX. The characters BCD in the first string are moved into the second through fourth positions in the string XYZXX.

 

SET VAR vsmove1 = (SMOVE('ABCDE',2,3,'XYZXX',2))

 

In the following example, the custcity column is 12 characters wide and contains the string ANCHORAGE in the first row. You can use SMOVE to fill in a blank (13 characters in the example above) in order to customize a report title. The value of vfulltitle is ANCHORAGE WAREHOUSE.

 

SET VAR vcity = custcity IN customer WHERE COUNT = 1

SET VAR vfulltitle = (SMOVE(.vcity,1,12,'             WAREHOUSE',1))