Assigning a value to a variable

Dear all, is it possible to assign a value to a variable and to use the variable in scans, such as a=4? I guess this is not supported by the scan functionn but perhaps you know a work around. Thanks and my best wishes, Robert

Comments

  • You're right, the scan language does not support variables.

    A "workaround" would depend on what it is you are trying to do. The scan language does allow you to do anything that is logically possible. If you have a range of values in mind you can use greater than and less than statements together to bracket the values in the range. If you have a set of specific values to test for, you could use a series of "or" statements. Or, if you want a combination of values all to be true, you can use a series of "and" statements. And so on. There is almost always a way to re-state the problem in a way that doesn't require variables.

    If you have specific instance in mind where your are using a variable but need a scan version, post it and we'll see if we have suggestions.
  • Thank you, Markd. I just thought of reducing typing work in the scan programs when changing a parameter but I think that this is not supported.
  • You could do that by pasting the scan into a text editor that has a replace function, then pasting the result back into the scan.