Peaceful chess queen armies: Difference between revisions
Content added Content deleted
Line 2,585: | Line 2,585: | ||
{{works with|gfortran|11.2.1}} |
{{works with|gfortran|11.2.1}} |
||
The example demonstrates modern Fortran’s capabilities for integer bit manipulation, using large machine integers (and their entire bitrange) as bitmaps to represent queen armies. Complicated (but nevertheless single-statement) expressions of such integers represent such operations as rotating a chessboard and checking for any attacks. |
The example demonstrates modern Fortran’s capabilities for integer bit manipulation, by using large machine integers (and their entire bitrange) as bitmaps to represent queen armies. Complicated (but nevertheless single-statement) expressions of such integers represent such operations as rotating a chessboard and checking for any attacks. |
||
There are two Fortran programs and a driver script. One program generates a Fortran module for basic operations; the other program (which must be linked with the generated module) does the actual work. The driver script is for Unix shell. |
There are two Fortran programs and a driver script. One program generates a Fortran module for basic operations; the other program (which must be linked with the generated module) does the actual work. The driver script is for Unix shell. |