Me too. I haven't used Assign> since Marcus pointed out several years ago that its easier (he didn't exactly say that it is my conclusion) to just test to see if the variable is equal to the text of the variable. In other wordsPepsiHog wrote:On a personal note. I don't use Assigned. I just check the string for what I am looking for. Or check if it is equal to nothing. But, six to one, half a dozen to another.
If>Variable={"Variable"}
Then nothing is assigned to the variable because it is still equal to its own text value.
Not that assigned isn't still more precise. For example if you assign a variable its text as a value, Assigned> will detect that the variable has been assigned a value.
Let>Variable={"Variable"}
Assigned>Variable,res
Will detect that "Variable" has been assigned a value
Let>Variable={"Variable"}
If>Variable={"Variable"}
will not differentiate between variable "Variable" having been assigned its own text as a value and its not having been assigned any value.
Not sure about the meaning of "parameterized variable" but I think I understand what you want. Use the *test to see if variable and variable text are equal* method.armsys wrote: How to detect a parameterized variable has been assigned?
Code: Select all
Let>List=One%crlf%two%crlf%three%crlf%four
Separate>List,crlf,var
Let>kk=0
Label>Loop
Add>kk,1
//Test "parameterized variable"
If>var_%kk%={"var_%kk%"}
mdl>done - no value found for var_%kk%
Exit
EndIf
Let>value=var_%kk%
message>value
Wait>1
Goto>Loop