Subscribe Bookmark RSS Feed

Why is this throwing an error?


Community Trekker


Jun 23, 2011

I have a data table with 2 rows from an import from Excel and am trying to extract some data.

Reticle1name = :Reticle[1];//Reticle is a column

Reticle2name = :Reticle[2];

Reticle1X= :Closest DUT# X[1];//Closest DUT# X is a column

Reticle2X= :Closest DUT# X[2];

Reticle1Y= :Closest DUT# Y[1];//Closest DUT# Y is a column

Reticle2Y= :Closest DUT# Y[2];

AlignmentBump= :Alignment Bump[1];//Alignment Bump is a column

This gives an error in the Log window:

Cannot set value for the column 'Alignment Bump' because the row number (-1) is not valid.

If I change the last line to

AB= :Alignment Bump[1];

It works.  Is this a problem of the whitespace interpretation?


Community Manager


Jun 23, 2011

It is sort of a problem of whitespace. JSL doesn't recognize whitespace outside of quoted strings (see Script Formatting, here), so AlignmentBump and Alignment Bump are the same. That means that you're trying to create a variable with the same name as a column.

You can do that, but you'll need to use a scoping operator to keep them separate. A single : identifies a column and two :: identifies a variable.