The change statement replaces text with new text in the current field (selected records only).
Parameters
This statement has two parameters:from – text to change.
to – new replacement text.
Description
This statement replaces text with new text in the current field (selected records only). The text will be replaced even if it is part of a larger word.
This example will scan thru the Element field and replace every occurence of the text Lead with the text Gold.
field Element
change "Lead","Gold"
Keep in mind that only the exact text specified will be replaced, including upper and lower case. If the field contains lead or LEAD, they will not be replaced with gold and GOLD. You would have to use three change statements to make sure all these combinations were replaced. (Or, you could use the changeword statement, which is case insensitive.)
On the other hand, if the field contains Leader, it will be replaced with Golder. If that’s not what you want, you should check out the changeword statement.
If you are converting from Panorama 6 to Panorama X and your procedures contain change statements, you may need to make adjustments.
If your change statement simply has two parameters separated by a comma, like this, then no changes are required.
change "Gold","Au"
However, if the parameters are separated by a space, you’ll have to change to a comma. So this statement, which was allowed by Panorama 6:
change "Copper" "Cu"
must be changed to:
change "Copper","Cu"
Panorama X no longer supports the words parameter. So if you had a statement like this:
change "this" "that" words
you must change it to this:
changeword "this","that"
Panorama X no longer supports the caps parameter. So if you had a statement like this:
change "MacDonald" "McGinty" words caps
you must change it to this:
changewordexact "MacDonald","McGinty"
In Panorama 6 the old and new text was limited to 150 characters, in Panorama X there is no limit.
See Also
History
Version | Status | Notes |
10.0 | Updated | Carried over from Panorama 6, but only allows two parameters (which must be separated by commas, not spaces). The WORD and CAPS options are no longer supported, use the changeword and changewordexact statements when this capability is needed. |