KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy How scan works and the difference between scan and backslash.

  • How scan works and the difference between scan and backslash.

    Posted by proof on June 1, 2025 at 4:14 pm

    What is the difference between scan and \?

    show USTour:([]StartCity:`Boston`NewYork`Washington`Miami`Austin`Chicago;EndCity:`NewYork`Washington`Miami`Austin`Chicago`Boston;wp:0 1 1 1 1 0)
    show route:USTour[`StartCity]!USTour[`EndCity]
    route scan `NewYork //returns `NewYork`Washington`Miami`Austin`Chicago`Boston</pre><p>In this situation, I can't seem to use the backslash (I get an error). However, if I want a termination condition (a while loop!) then I need to use the backslash:</p><pre>(`Austin <>)route\ `NewYork //returns `NewYork`Washington`Miami`Austin

    How can I know which one to use? When is the backslash interchangeable with scan?

    proof replied 1 day, 15 hours ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

Log in to reply.