replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Help, my CEILING has vanished, and other v5.50 woes
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help, my CEILING has vanished, and other v5.50 woes

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Fri Mar 12, 2010 6:22 pm    Post subject: Help, my CEILING has vanished, and other v5.50 woes Reply with quote

A quick resume of this afternoon's events:
- install FTN95 v5.50

- reinvestigate the code fragment in the "More fun with pointers" thread. Find that it continues to behave differently to the same code compiled with Paul's latest version, and post to that effect

- Return to real code and spend a frustrating afternoon trying to figure out why sexy new algorithm is not behaving as expected.

- Note whilst thus engaged that there seems to be a problem of breakpoint synchronization between Plato and sdbg. At first, I can't figure out why I can't set a breakpoint on an executable line; turns out Plato is showing a breakpoint on that line, and I have to clear it in Plato; F2 in sdbg at that line has no effect. Code still breaks at such invisible breakpoints though.

- At one point, after making some changes and rebuiliding, FTN95 suddenly informs me thusly:

WARNING the following symbols are missing: CEILING

This is the standard intrinsic CEILING, so FTN95's sudden inability to find it is, ah ... perturbing.

- try rebooting; same problem

- can't figure out why the Rebuild option is greyed out. Force the need for a complete rebuild by deleting and reinstating one character in the lowest level module, and rebuilding. Same problem persists.

- try running the exe anyway. Sure enough, when FTN95 needs to use CEILING, it's not there:

Error 29: Call to missing routine: _CEILING at 0x00408166

Obviously it's not very hard to work around this sudden disappearance, but equally obviously that's not the point ... grateful for any assistance with diagnosis and cure of these various issues.

Andy
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Fri Mar 12, 2010 6:35 pm    Post subject: Reply with quote

Again ceiling is working OK for me.
Can you post a small program with ceiling not working.
Also what are your debugging options?
Also .NET or Win32?
Back to top
View user's profile Send private message AIM Address
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Fri Mar 12, 2010 6:39 pm    Post subject: Reply with quote

Hi, got to go now, will try and investigate further chez moi.

<edit> later, chez Sparge ...

OK, it's getting rather more interesting now.

First of all, no idea what was causing the "insufficient memory" error mentioned in the "More fun with pointers" thread. I uninstalled all updates leaving only v4.70 and it was still doing it. Then I installed upgrade v5.40 and all is (apparently) well again.

The code that gives the missing CEILING warning with v5.50 at work gives the same warning with v5.40 at home. So the upgrade to v5.50 is clearly a red herring - it's something in my code. Or rather, it's an interaction between something in my code and something in FTN95. A small program that illustrates the problem ... well, I've made a start. I may be some time.
Back to top
View user's profile Send private message Send e-mail
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Sat Mar 13, 2010 10:10 am    Post subject: Re: Reply with quote

PaulLaidler wrote:
Again ceiling is working OK for me.
Can you post a small program with ceiling not working.
Also what are your debugging options?
Also .NET or Win32?


Not surprised CEILING is working OK for you - it was working OK for me until late yesterday Very Happy

I'm using Win32. Not sure what you mean by debugging options: the problem occurs during linking. It does so whether I compile with /RELEASE, /DEBUG or /CHECKMATE.

How small a "small program" would be acceptable? At the moment I've (carefully) hacked away all the low hanging fruit and I'm down to around 1600 lines of code, albeit a lot of comments, and two third-party DLLs ...
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Sat Mar 13, 2010 5:06 pm    Post subject: Reply with quote

If ceiling is "missing" then a two line program should be sufficient to demonstrate the bug. Otherwise there is something odd about your code.
You can send me all the code by email and I will take a look at it.
I will send you a forum message to provide an email address.
Back to top
View user's profile Send private message AIM Address
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Tue Mar 16, 2010 6:28 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
... something odd about your code ...


Well, it's not quite 2 lines, but I think it demonstrates that the oddness resides in your compiler and not in my code. Even I was not prepared for just how simple and mundane the end result was going to be. I have not experimented to see if other intrinsics are similarly afflicted or if I just got (un)lucky with CEILING.

Incidentally, even the CALL is superfluous; I just didn't want my main program to do nothing.

Andy

Code:

      program a_program
      use a_module
      call a_subroutine
      stop
      end program a_program

      module a_module
      type fancy_integer
        integer fancy
      end type fancy_integer
      type (fancy_integer) french (1)
      contains
      subroutine a_subroutine
      integer ceiling_fan
      french (1)% fancy = 1
      ceiling_fan = ceiling (french (1)% fancy)
      return
      end subroutine a_subroutine
      end a_module
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Tue Mar 16, 2010 7:25 pm    Post subject: Reply with quote

The first argument of ceiling must be real.
There is an optional integer second argument to set the integer kind for the result.
Back to top
View user's profile Send private message AIM Address
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Tue Mar 16, 2010 8:45 pm    Post subject: Reply with quote

Fair cop - I did wonder about that Embarassed I didn't check because it seemed reasonable that ceiling (n) for integer n should just return n. In the real code, with a great deal more complexity, the argument was originally real. I didn't make the connection between changing the type, and the weird error message, which is neither helpful nor accurate. Also, building the module in isolation produces no error message, which is also incorrect behaviour.
Back to top
View user's profile Send private message Send e-mail
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Wed Mar 17, 2010 12:31 am    Post subject: Reply with quote

You may have lost the ceiling, but I've just found it !
I've never taken the time to notice these new intrinsics before. In the past INT and MOD have always caused problems with -ve values . Something to keep in mind.
Code:
      integer i,j,k
      real    x,y
!
      do k = 1,4
         x = 23.4
         if (mod(k,2)/=1) x = -x
         y = 7
         if (k>2) y = -y
!
         write (*,*) ' '
         write (*,*) x, y, ' Modulo ', modulo(X,Y)
         write (*,*) x, y, ' Mod    ', mod(X,Y)
         if (k>2) cycle
         write (*,*) x,    ' Int    ', int(X)
         write (*,*) x,    ' Floor  ', floor(X)
         write (*,*) x,    ' Ceiling', ceiling(X)
      end do
!
      do k = 1,4
         i = 23
         if (mod(k,2)/=1) i = -i
         j = 7
         if (k>2) j = -j
!
         write (*,*) ' '
         write (*,*) i, j, ' Modulo', modulo(i,j)
         write (*,*) i, j, ' Mod   ', mod(i,j)
      end do
!
      end
Back to top
View user's profile Send private message
simon



Joined: 05 Jul 2006
Posts: 299

PostPosted: Sun Oct 06, 2013 8:14 pm    Post subject: Reply with quote

I've experienced the same problem a number of times. I will incorrectly do something like the following:

Code:
PROGRAM p
  INTRINSIC ceiling
  PRINT *, ceiling(1/2)
END PROGRAM p


It would be helpful if the compiler could indicate that the first argument should be real, rather than (presumably) assuming that the user defined an overloaded version that did not get loaded.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Mon Oct 07, 2013 7:58 am    Post subject: Reply with quote

I will see if I can provide a warning message.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group