Attempting to Assign to an Object That is not an L-ValueHi, I'm getting this error.
"attempting to assign to an object that is not an L-value{1} in access or evaluation of 'Assign' , Row() & dt:sequence[Row() + 1] = Row() + 1"
Not quite sure what L-value means. Think it might be to do with the fact that sequence is an inbulit function. Any help would be appreciated.
Re: Attempting to Assign to an Object That is not an L-ValueI have a very simple example of this: I have a table with a column named "Electrolyte Solution". When I did this:
for each row(
:Electrolye Solution = "Lot 5";
);
I got the error "attempting to assign to an object that is not an L-value". Of course, I had left the "t" out of the column name. You know what would have been super helpful? An error message that said:
"Electrolye Solution" is not a valid column name.
Then, I could have fixed my script in 5 seconds instead of 20 minutes.
Thanks!
Eric
Re: Attempting to Assign to an Object That is not an L-Valuean L-value is a value that can appear on the left-hand side of an assignment statement. Here's an example that might be similar to what you are trying to do:
dt = New Table( "Untitled",
Add Rows( 5 ),
New Column( "sequenceSteps",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [5, 3, 1, 2, 4] )
)
);
Row() = 1;
For( i = 1, i <= 20, i++,
Row() = dt:sequenceSteps[Row()];
dt << clearSelect;
dt << selectrows( Row() );
Print( Row() );
Wait( 1 );
);
5
4
2
3
1
5
4
2
3
1
5
4
2
3
1
5
4
2
3
1
Re: Attempting to Assign to an Object That is not an L-ValueOkay thanks, I changed the order of the statement to: Row() = dt:sequenceSteps[Row()];
but I'm still getting the same error. Should I assign Row() to a variable? Still don't quite understand what the issue is.
Re: Attempting to Assign to an Object That is not an L-ValueThe Assign() function takes two arguments, the left and the right side as they appear using the operator. An example of an valid assignment is x = Log(5). An example of an invalid assignment is Log(5) = x.