Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
reallyneedhelp
Level III

Convert every numbers in a list to strings

Hi everyone, just out of curiosity, I wonder if there is a way to convert every numbers in a list to strings?

For eg, I have a list:

listsss = {1, 4, 56, 72, 8, 9, 10};

and I want to convert them into:

listsss = {"1", "4", "56", "72", "8", "9", "10"};

Is there any way to do it by JSL? Any comments will be appreciated. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Craige_Hales
Staff (Retired)

Re: Convert every numbers in a list to strings

L = {10, 200, 3000};
For( i = 1, i <= N Items( L ), i += 1,
	L[i] = Char( L[i] )
);
Show( L );

L = {"10", "200", "3000"};

Craige

View solution in original post

2 REPLIES 2
Highlighted
Craige_Hales
Staff (Retired)

Re: Convert every numbers in a list to strings

L = {10, 200, 3000};
For( i = 1, i <= N Items( L ), i += 1,
	L[i] = Char( L[i] )
);
Show( L );

L = {"10", "200", "3000"};

Craige

View solution in original post

Highlighted
reallyneedhelp
Level III

Re: Convert every numbers in a list to strings

@Craige_Hales This is perfect. Thank you!

Article Labels

    There are no labels assigned to this post.