Using wfprintf with "line too long" problem


I have a problem with "line too long" while using wfprintf

I got a lot of waves to deal with, after that, I need to out put all these waves by wfprintf

But, as you can see, the following command I try was way too long

I try to search some command like "..." as Matlab, which mean continue code on next line

Did Igor have command like that which could help me out ?

Or is there any other ideal which could help me work out ?


Thanks for your help. 


Open/A/P=$(path) refNum as "weather.10min_"+Smm

wfprintf refNum, "%s%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%12.3f\r\n" $("M"+num2str(Start_month)),$("M"+num2str(month)+"_wave0"),$("M"+num2str(month)+"_wave1"),$("M"+num2str(month)+"_wave2"),$("M"+num2str(month)+"_wave3"),$("M"+num2str(month)+"_wave4"),$("M"+num2str(month)+"_wave5"),$("M"+num2str(month)+"_wave6"),$("M"+num2str(month)+"_wave7"),$("M"+num2str(month)+"_wave8"),$("M"+num2str(month)+"_wave9"),$("M"+num2str(month)+"_wave10"),$("M"+num2str(month)+"_wave11"),$("M"+num2str(month)+"_wave12"),$("M"+num2str(month)+"_wave13"),$("M"+num2str(month)+"_wave14"),$("M"+num2str(month)+"_wave15")

Close refNum

Igor Pro 8 supports commands of up to 2500 bytes so your wfprintf command should work in Igor Pro 8.

Here is a function that should work in your Igor version and is easier to read and more efficient:

Function Demo(path, Smm, Start_month, month)
    String path // Name of symbolic path
    String Smm  // Part of file name
    Variable Start_month
    Variable month
    Variable refNum
    Open/A/P=$(path) refNum as "weather.10min_"+Smm
    String format = "%s%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%9.3f%12.3f\r\n"
    WAVE startMonth = $("M"+num2str(Start_month))
    String monthStr = "M"+num2str(month)
    WAVE w0 = $(monthStr+"_wave0")
    WAVE w1 = $(monthStr+"_wave1")
    WAVE w2 = $(monthStr+"_wave2")
    WAVE w3 = $(monthStr+"_wave3")
    WAVE w4 = $(monthStr+"_wave4")
    WAVE w5 = $(monthStr+"_wave5")
    WAVE w6 = $(monthStr+"_wave6")
    WAVE w7 = $(monthStr+"_wave7")
    WAVE w8 = $(monthStr+"_wave8")
    WAVE w9 = $(monthStr+"_wave9")
    WAVE w10 = $(monthStr+"_wave10")
    WAVE w11 = $(monthStr+"_wave11")
    WAVE w12 = $(monthStr+"_wave12")
    WAVE w13 = $(monthStr+"_wave13")
    WAVE w14 = $(monthStr+"_wave14")
    WAVE w15 = $(monthStr+"_wave15")
    wfprintf refNum, format, startMonth, w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15
    Close refNum