Text completion: Difference between revisions

→‎{{header|REXX}}: exlained in the REXX section header the method(s) used.
(Added Go)
(→‎{{header|REXX}}: exlained in the REXX section header the method(s) used.)
Line 288:
 
=={{header|REXX}}==
The method used to find a word   (that is contained in a specified
dictionary)   closest to a specified string of letters is:
 
Perform any of   (three methods of actions):
::*    ''delete''  any letter
::*    ''insert''  any letter
:::*   (any letter is inserted at any location)
:::*   (this includes prefixing any letter)
:::*   (this includes suffixing any letter)
::*    ''substitute''  any letter at any location
 
 
<small>(Only lowercase letters were used for the [above] three methods).</small>
 
Perform any of the above along with any combination of any method.
 
This will, in effect, delete/insert/substitute any two letters:
::* &nbsp; &nbsp;''delete''&nbsp; + &nbsp;''delete''&nbsp;
::* &nbsp; &nbsp;''delete''&nbsp; + &nbsp;''insert''&nbsp;
::* &nbsp; &nbsp;''delete''&nbsp; + &nbsp;''substitute''&nbsp;
::* &nbsp; &nbsp;''insert''&nbsp; + &nbsp;''delete''&nbsp;
::* &nbsp; &nbsp;''insert''&nbsp; + &nbsp;''insert''&nbsp;
::* &nbsp; &nbsp;''insert''&nbsp; + &nbsp;''substitute''&nbsp;
::* &nbsp; &nbsp;''substitute''&nbsp; + &nbsp;''delete''&nbsp;
::* &nbsp; &nbsp;''substitute''&nbsp; + &nbsp;''insert''&nbsp;
::* &nbsp; &nbsp;''substitute''&nbsp; + &nbsp;''substitute''&nbsp;
 
No attempt was made to change (by any method) three letters or more.
<lang rexx>/*REXX pgm finds (dictionary) words which can be found in a specified word wheel (grid).*/
parse arg what iFID . /*obtain optional arguments from the CL*/