Sudoku/REXX: Difference between revisions

no edit summary
m (corrected a misspelling of the REXX language (to the correct/official computer programming language name).)
No edit summary
Line 1:
{{collection|Sudoku}}
 
==[[REXX]]==
<span style='font-family: "Linux Libertine",Georgia,Times,serif;font-size:150%;'>[[REXX]]</span><hr>
=== REXX version 1 ===
This is the &nbsp; '''<code>$SUDOKU.REX''' &nbsp;</code> (REXX) program and is used to solve the Rosetta Code task of "sudoku".
 
 
This REXX program was originally written to assist in sudoku puzzle solving (by giving strong hints), and not to solve the puzzle outright.
Line 11 ⟶ 10:
<br>and to partially solve the puzzle using distinct strategies (separately or in combination). &nbsp; One option is to solve the puzzle.
 
The help for the &nbsp; '''<code>$SUDOKU''' &nbsp;</code> REXX program is included here &nbsp; ───► &nbsp; [[$SUDOKU.HEL]].
 
The &nbsp; '''<code>$SUDOKU.REX''' &nbsp;</code> REXX program makes use of &nbsp; '''<code>$ERR.REX''' &nbsp;</code> REXX program which is used to display error messages (via &nbsp; '''$T.REX''').
 
The &nbsp; '''<code>$ERR.REX''' &nbsp;</code> REXX program is included here &nbsp; ───► &nbsp; [[$ERR.REX]].
 
The &nbsp; '''<code>$SUDOKU.REX''' &nbsp;</code> REXX program makes use of &nbsp; '''<code>$T.REX''' &nbsp;</code> REXX program which is used to display text messages.
 
The &nbsp; '''<code>$T.REX''' &nbsp;</code> REXX program is included here &nbsp; ───► &nbsp; [[$T.REX]].
 
Some older REXXes don't have a &nbsp; '''changestr''' &nbsp; BIF, so one is included here &nbsp; ───► &nbsp; [[CHANGESTR.REX]].
 
REXX programs &nbsp; ''not'' &nbsp; included are &nbsp; '''<code>$H''' &nbsp;</code> which shows/displays '''help''' and other documentation.
<syntaxhighlight lang="rexx">
<lang rexx>/*REXX program displays, can give hints, and/or solve a sudoku puzzle. */
trace off
parse arg !
Line 829:
syntax: !sigl=sigl; call er 13,!fid(2) !fid(3) !sigl !cal() condition('D') sourceline(!sigl)
tem: parse arg r,c,w; if tellInvalid then say '***error!*** row' r", col" c '('@.r.c") is a duplicate of another in the same" w'.'; return 0
tg: arg tg; if simple then tg=simple(tg); call $t gridindent || tg; return</langsyntaxhighlight>
 
 
Line 2,201:
Nop
End
Exit 12</lang>
</syntaxhighlight>
{{out}}
<pre>