Syntax question on: vSet = @@vSet;

Can you please explain the syntax and logic on this line from the query below?

“vSet = @@vSet;”

vSet is not declared anywhere.

And if vSet is the same as (equal to) @@vSet, then why dont we just use @@vSet?

Thank you.

CREATE QUERY aFindPath(String startingWord, String endWord) FOR GRAPH MyGraph {
 SetAccum<edge> @@edgeSet;
 SetAccum<vertex> @@vSet;
 Start (ANY) = {word.*};
 Start = select s from Start:s where s.Text == startingWord;
 while Start.size() > 0 limit 20 do
   Start = select t from Start:s-(newtWord:e)-word:t
           accum @@edgeSet += e,
                              @@vSet += t
           having t.test != endWord;
 vSet = @@vSet;
 print @@edgeSet, vSet;

Hey George,

This relates back to one of your first questions - you said you wanted to print out the text attribute of each vertex. If you simply print the Accumulator values, it will only print the IDs of the vertices, without the attributes.

We’re declaring vSet exactly on that line : vSet = @@vSet;

This is a vertex set, which is slightly different from a set accumulator.