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 

Unusual experience with %rf

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2249
Location: Sydney

PostPosted: Thu Aug 23, 2007 8:29 am    Post subject: Unusual experience with %rf Reply with quote

Paul,

I am having an unusual result with the following line in a large menu page.
I print out the same real*8 variable with a %rf and %wf format, but the %rf displays the value of another variable.

i = winio@ ('%2nl %rf Production Variability factor %wf&', RH_var_weight, RH_var_weight)

Can there be any easy explaination why the %rf is displaying another variable (r_d1) which is the first real*8 variable listed in the menu page structure ?

i = winio@ (' %20sl&',r_d1,r_min,r_max)

It appears to me that the table of variable addresses is being modified/corrupted.

This is part of a very large simulation model I am developing and would be difficult to send. I could send the module definitions and this routine with a screen dump showing the apparent error.

Any ideas where to look ?

Regards John
Back to top
View user's profile Send private message
IanLambley



Joined: 17 Dec 2006
Posts: 474
Location: Sunderland

PostPosted: Thu Aug 23, 2007 9:22 am    Post subject: Reply with quote

I tried it and it worked perfectly - is it a data definition problem causing things to be out of line from one subroutine to the next? The %wf will only display the value that was valid on wntry to the form and is not updated, se %`rf instead.

Is this what you intended as it works OK for me.
Code:

      program rfwf
      implicit real*8 (a-h,o-z)
      include <windows.ins>
      common/data/RH_var_weight,r_d1,r_min,r_max
      RH_var_weight  =1234d0
      r_d1 = 0d0
      r_min = -100d0
      r_max = 100d0
      i = winio@ (
     &  '%bg[btnface]%2nl %`bg[white]%rf&', RH_var_weight)
      i = winio@ (
     &  '%ff PVF using %%wf %wf&', RH_var_weight)
      i = winio@ ('%ffPVF using %%`rf %`rf&', RH_var_weight)
      i = winio@ ('%ff %20sl&',r_d1,r_min,r_max)
      i = winio@ ('%2nl r_d1 %`rf',r_d1)

      PRINT *,RH_var_weight,r_d1
      END



Ian
Back to top
View user's profile Send private message Send e-mail
JohnCampbell



Joined: 16 Feb 2006
Posts: 2249
Location: Sydney

PostPosted: Fri Aug 24, 2007 12:23 am    Post subject: Reply with quote

Ian,

Thanks for your suggestions. I spent last night selectively deleting parts of the menu screen and found the problem with an earlier %fl which was not closed off with a %`fl

i = winio@ (' %df%fl%5rf&',r_dd,r_min,r_max,r_d1)

I was confused when sucessive %rf %wf gave different values.

It's always good to leave a problem for a few hours then hane another go.

Thanks again for your help.

John
Back to top
View user's profile Send private message
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Fri Sep 21, 2007 9:50 am    Post subject: Re: Reply with quote

JohnCampbell wrote:
... found the problem with an earlier %fl which was not closed off with a %`fl


I just re-read this, and something registered that did not register before. As far as I know there is no requirement for %fl to be closed off with %`fl. At any rate the manual does not mention it, and I have never done it. The odd thing is I have had occasional problems with %fl, which would have been eliminated by exactly just such a construct! So I'm curious now. Does %fl require a %`fl to work properly, and is it as yet undocumented?

Andy
Back to top
View user's profile Send private message Send e-mail
IanLambley



Joined: 17 Dec 2006
Posts: 474
Location: Sunderland

PostPosted: Fri Sep 21, 2007 12:19 pm    Post subject: %Fl - documentation Reply with quote

Actually, it is documented in FTN95.chm, where it states:

for %fl :
"Modifiers: Grave accent (`) - cancels an earlier %fl and restores the limits to the minimum and maximum for the data type."

and for %il :
"Modifiers: Grave accent (%`il) - cancels an earlier %il and restores the limits to the minimum and maximum for the data type."
Back to top
View user's profile Send private message Send e-mail
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Fri Sep 21, 2007 12:50 pm    Post subject: Reply with quote

Aha. I just checked because I am using v5.10 of FTN95 and was curious how I did not have an up-to-date version of the manual. It seems we are both right Wink . In the Win32,ClearWin+ section, %`fl and %`il are indeed documented in the Format Code Reference section - but not in the Input and Output section (which is where I was looking).

Thanks, Ian.

Paul, can the manual be updated for consistency, please?

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


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

PostPosted: Sat Sep 22, 2007 7:38 am    Post subject: Reply with quote

I will see what can be done.

Paul
Back to top
View user's profile Send private message AIM Address
Wilfried Linder



Joined: 14 Nov 2007
Posts: 314
Location: Düsseldorf, Germany

PostPosted: Thu Nov 15, 2007 9:14 am    Post subject: Reply with quote

Hi,

just a question: Using %rf, initial values are displayed in "automatic" formats, that means, the number of decimals depends on the width of the field and the real number, also it might happen that an exponential format is used. It would be very nice if the user can define the format (like F12.3 --> %12.3rf). Up to now, I must use contructions like

write(string,'(F12.3)')value
%rs
read(string,*)value

...which is not very comfortable.

Additional question: It would be nice if within %rf the delimiter sign could vary, for instance using the "country settings" of the operating system. In this way, if "Germany" is selected, the delimiter will be ",". (This is already done in many programmes, like the MS office tools).

Will there be changes in future releases of FTN95?

Regards,
Wilfried
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Nov 15, 2007 3:42 pm    Post subject: Reply with quote

There are no plans to extend ClearWin+ at the moment.

If you need this kind of control then it will be necessary to use %rs with code to do the formatting.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2196
Location: Yateley, Hants, UK

PostPosted: Thu Dec 20, 2007 10:15 pm    Post subject: Support for Wilfried's request Reply with quote

I agree with Wilfried that being able to control the number of decimal places displayed in %rf would be very useful - especially in an %`rf.
A question to Paul: What does it take to get something moved up the priority list - or for that matter, onto it?

I have followed this thread with a sort of smugness, as I discovered that one needed to curtail the effects of %fl with a %`fl long ago. However, just this week I discovered a case where I hadn't done so, and it was causing an intermittent problem. I might have spent longer finding it without the recollection of this thread in my mind, so thanks all.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Dec 21, 2007 11:17 am    Post subject: Reply with quote

The best that I can do is to put these things on the "wish list".
I cannot promise that they will be implemented soon.
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 -> ClearWin+ 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