A long stringList
mwpro
I have a question on the length of a string list that is valid and how can this one list be written in a multiple lines in procedure window.
I am getting the expected terminating quote error and I am guessing I exceed the maximum length allow for a string list.
How do I solve this problem? besides constructing multiple lists and splitting the original list?
Thanks!
Write the code lines to a notebook.
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
April 1, 2018 at 07:39 pm - Permalink
For example:
String longList="abc;def;ghi;jkl;" + \
"mno;pqr;stu;xyz;"
print longList
End
Note that each line must have an opening and closing ", so the string + operator is needed.
For more details:
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
April 1, 2018 at 07:20 pm - Permalink
May I ask how to execute the codes in a notebook? If I understand it correctly?
April 1, 2018 at 08:48 pm - Permalink
Thanks! Does Igor 6 have similar features?
April 1, 2018 at 08:49 pm - Permalink
Details are in the help topic Notebooks -> Notebooks as Worksheets
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
April 1, 2018 at 09:19 pm - Permalink
It does not, sorry.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
April 1, 2018 at 11:12 pm - Permalink
String longList="abc;def;ghi;jkl;"
longList+="mno;pqr;stu;xyz;"
print longList
End
... although I agree, that the problem should be approached differently.
April 2, 2018 at 03:38 am - Permalink
April 2, 2018 at 02:32 pm - Permalink