Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Why can't I post longer messages?

WSinc
New Contributor I
448 Views
Is there a restriction?
This generates a spurious BREAKPOINT at line 13, for no apparent reason.
****************************************

program tallyall

logical eof

integer*4 ntally,ipuz,ital(2,10),level

integer*2 nmove,moves(729)

integer*1 b(9,9),b2(9,9),boards(1,1,4096)

integer*4 BIGNUM/2140000000/

rewind(3)

ntally=0

! call read_puzzle(boards)

ital(1,1)=1

ital(2,1)=1

do level=1,10

ipuz1=ital(l,level)

ipuz2=ital(2,level)

ital(1,level+1)=ipuz2+1

do ipuz=ipuz1,ipuz2

! print *,level,ipuz

! call gengood_3x(boards(1,1,ipuz),nmove,moves)

! print *,"nmove=",nmove

do imove=1,nmove

ntally=ntally+1

! call appmove(boards(1,1,ipuz),moves(imove),boards(1,1,ntally))

ital(2,level+1)=ntally

end do

end do ! ipuz

20 print *,"ntally=",ntally

ital(2,level+1)=ntally

read(*,*)

end do ! level

read(*,*)

end

0 Kudos
7 Replies
billsinclaol_com
Beginner
448 Views
I tried different "fixes:"
1) changing the name and type of ITAL to different Integer sizes
2) removing the DO loop and replacing it with Go To statements
3) commenting out almostALL the code past line 14.
(keeping the END statement)
4) changing theNAME of the variable LEVEL.
5) Putting ITAL in a COMMON block.
I still get the same result.

The breakpoint message says that subscript#1 is a zero.
You can see that itis a fixed integer.
How could it be ZERO?
0 Kudos
WSinc
New Contributor I
448 Views
Here is the "fixed" code.
even something as bare bones as this doesn't run.

program tally8

logical eof

integer*4 ntally,ipuz

integer*2 nmove,moves(729),ilev

integer*1 b(9,9),b2(9,9),boards(1,1,4096)

integer*4 BIGNUM/2140000000/

integer*8 xtal(2,10)

data boards/81*0/

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! rewind(3)

ntally=0;ilev=0

! call read_puzzle("..\..\sudoku_inp.txt",boards)

! xtal(1,1)=1

! xtal(2,1)=1

5 ilev=ilev+1

ipuz1=xtal(l,ilev)

! ipuz2=xtal(2,ilev)

! xtal(1,ilev+1)=ipuz2+1

! do ipuz=ipuz1,ipuz2

! print *,ilev,ipuz

! call gengood_3x(boards(1,1,ipuz),nmove,moves)

! print *,"nmove=",nmove

! do imove=1,nmove

! ntally=ntally+1

! call appmove(boards(1,1,ipuz),moves(imove),boards(1,1,ntally))

! xtal(2,ilev+1)=ntally

! end do

! end do ! ipuz

!20 print *,"ntally=",ntally

! xtal(2,level+1)=ntally

! read(*,*)

! go to 5 ! ilev

! read(*,*)

end

0 Kudos
IanH
Honored Contributor II
448 Views
On the 13 line of code (not including blank lines in the source) you have the lower case equivalent of IPUZ1=ITAL(L,LEVEL). Perhaps the "L" should be a "1"?

Implicit none!!!
0 Kudos
WSinc
New Contributor I
448 Views
Fortran is NOT case sensitive.
R U saying the 1 is an L? The print is so darn small.
I will try implicit NONE.

Thanks
0 Kudos
Steven_L_Intel1
Employee
448 Views
Yes, in the line quoted, the first argument is the letter l and not the digit 1. IMPLICIT NONE is your friend.
0 Kudos
WSinc
New Contributor I
448 Views
Well, that was STUPID on my part...............

But I am wondering if there is a way to prevent that from
happening later on.

Maybe by making the print larger?
Changing the font type?

I honestly could not tell them apart.
0 Kudos
IanH
Honored Contributor II
448 Views
Quoting billsincl
But I am wondering if there is a way to prevent that from
happening later on.

Implicit none ;)

If you are using Visual Studio as your editing environment the fonts and sizes are pretty configurable - have a look under Tools > Options, then under Environment > Fonts and Colors. The "Plain text" acts as a global default for things that are plain text (like source code), but you can customise the text for specific source elements, comments, etc with other items in the list.

Consolas is my font of choice (and may even be the default with VS these days) because its design is particularly suited to source code (0 (zero) distinguishable from the capital letter O, etc), if you are using VS2005 on Windows XP there is a Consolas font pack that you can download from Microsoft that gives you access to this font.

0 Kudos
Reply