A long stringList

Hello

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!
Presuming that you are generating code, I (and others) would likely recommend a different approach than writing to a string list.

Write the code lines to a notebook.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
If you are asking about writing code with long lines, Igor 7 has a line continuation feature:

For example:
Function foo()
    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:
DisplayHelpTopic "Line Continuation"

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
jjweimer wrote:
Presuming that you are generating code, I (and others) would likely recommend a different approach than writing to a string list.

Write the code lines to a notebook.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH


May I ask how to execute the codes in a notebook? If I understand it correctly?
JimProuty wrote:
If you are asking about writing code with long lines, Igor 7 has a line continuation feature:

For example:
Function foo()
    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:
DisplayHelpTopic "Line Continuation"

--Jim Prouty
Software Engineer, WaveMetrics, Inc.


Thanks! Does Igor 6 have similar features?
mwpro wrote:

May I ask how to execute the codes in a notebook? If I understand it correctly?


Details are in the help topic Notebooks -> Notebooks as Worksheets

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
mwpro wrote:

Thanks! Does Igor 6 have similar [line continuation] features?


It does not, sorry.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
How about the good old ...
Function foo()
    String longList="abc;def;ghi;jkl;"
    longList+="mno;pqr;stu;xyz;"

    print longList
End


... although I agree, that the problem should be approached differently.