Bug?...Or Change in Igor Operation

This example from IGOR manual no longer seems to work:

Function DisplayXY(xWaveNameStr, yWaveNameStr)
    String xWaveNameStr, yWaveNameStr

    Display $yWaveNameStr vs $xWaveNameStr
End


I have two integer waves that I tried to graph with this function, but get a SyntaxError message that says "Expected text wave". Has something changed (I'm using Igor 6.31), or am I simply missing something?

Clayton
ctmckee wrote:
This example from IGOR manual no longer seems to work: ...


Without actually testing, I wonder should this be the coding instead ...

Function DisplayXY(xWaveNameStr, yWaveNameStr)
    String xWaveNameStr, yWaveNameStr

        wave xwave = $xWaveNameStr
        wave ywave = $yWaveNameStr

    Display ywave vs xwave
        return 0
End


Alternatively, are you certain that you are inside the folder containing the two waves (and not for example at root:).

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
Also, since the function is expecting strings, make sure that's what you are sending.

DisplayXY(wave1, wave0)          //waves

DisplayXY("wave1", "wave0")    //names of waves as strings
ctmckee wrote:
This example from IGOR manual no longer seems to work:

Function DisplayXY(xWaveNameStr, yWaveNameStr)
    String xWaveNameStr, yWaveNameStr

    Display $yWaveNameStr vs $xWaveNameStr
End


I have two integer waves that I tried to graph with this function, but get a SyntaxError message that says "Expected text wave". Has something changed (I'm using Igor 6.31), or am I simply missing something?


This works for me in Igor Pro 6.31:
#pragma rtGlobals=3     // Use modern global access method and strict wave access.

Function DisplayXY(xWaveNameStr, yWaveNameStr)
    String xWaveNameStr, yWaveNameStr
 
    Display $yWaveNameStr vs $xWaveNameStr
End

Function Test()
    Make/O/I xwave=p, ywave=sin(p/8)
    DisplayXY("xwave", "ywave")
End


Possibly the error message is not coming from where you think it is. Try stepping through it with the Igor Debugger.

If you can't determine the problem post a complete example or attach an experiment file that illustrates the problem.

Thanks for all the comments. Solution was not putting " " around string entry when running the function from the command window.

C