5.23 How to convert 3456 to 3,456 ?

From the net, by Carl Devor:

`print/commas`:= proc(N::integer) 
    local n,s,i,b; 
    n:= ListTools:-Reverse(convert(abs(N), base, 1000)); 
    if N<0 then n:= subsop(1= -n[1], n) fi; 
    nprintf("%s", sprintf(cat("%d", ",%03d" $ nops(n)-1), n[])) 
 end proc: 
 
commas(456554); 
 
         456,554
 

To convert a string to array of chars use array(StringTools:-Explode(S))

s:="Nasser M. Abbasi": 
r:=array(StringTools:-Explode(s)); 
              r:=["N" "a" "s" .......]
 

Now can use the string as normal array

r[4]; 
      "s"