 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Thu Dec 12, 2024 5:54 pm Post subject: |
|
|
Code: | module MOD1
real*8 :: var1=0
Contains
integer function fun3 ()
call window_update@(var1)
fun3 = 2
end function fun3
end module MOD1
!.....................
Program CONFL2
use mod1
i=winio@('%ww%ca[Not Working]&')
i=winio@("%co[check_on_focus_loss]&")
i=winio@('%^30sl[horizontal] %df%^11rf[fmt=0.3e]%ff&',var1, 0d0,1d0, fun3, 0.1d0, var1,fun3 )
i=winio@('%nl%cn%bt[OK]%es')
END |
The whole purpose of this code is to set using slider some preliminary (low resolution) value of some variable var1 and then use %dd or %rf to set it precisely as needed. And during the process when you move slider you see the value of variable and vice versa if you change the value of var1 in the %dd or %rf the slider also reacts on that.
This link of these controls is broken if %co[on_focus_loss] is present in the code.
Or even worse, the %co somehow conflicts with the %cw (or its components which allow to highlight and save parts of the text inside %cw window) and the whole GUI crashes
Last edited by DanRRight on Fri Dec 13, 2024 2:17 pm; edited 1 time in total |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8168 Location: Salford, UK
|
Posted: Fri Dec 13, 2024 9:26 am Post subject: |
|
|
Dan
What you experience and describe is not a bug but is what you get with %co[check_on_focus_loss]. In effect it is a limitation on the use of [fmt=0.3e].
I will see if I can come up with a work-around or an enhancement to ClearWin+.
You do not provide any information about the %cw failure so I am not able to comment on that. |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8168 Location: Salford, UK
|
Posted: Fri Dec 13, 2024 2:08 pm Post subject: |
|
|
The next release of the DLLs for the ClearWin+ library will include an enhancement so that the following program will respond as requested.
The slider will immediately respond to changes made via the spin control.
Code: | winapp
program main
real*8 :: var1=0
i=winio@('%ww%ca[Working]&')
i=winio@('%30sl[horizontal]&',var1,0d0,1d0)
i=winio@('%fl&',0d0,1d0)
i=winio@("%co[check_on_focus_loss]&")
i=winio@(' %df%11rf[fmt=0.3e]&',0.1d0,var1)
i=winio@('%ff%nl%cn%tt[OK]')
end |
|
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Mon Dec 23, 2024 5:42 am Post subject: |
|
|
That is great. All workarounds for Clearwin are welcome. Clearwin is not yet a Standard Fortran anyway. But it is very powerful and incredibly useful tool. People who use this compiler for years but do not use Clearwin are just a effing m$%^s.
If Silverfrost similarly lead the entire Fortran development (for which it had all the chances starting from 1990th) then any workarounds, any sneeze developers made or what their left leg would just decided anywhere in Fortran also become a standard. Given the perturbations with Intel and its Fortran and some others stopped their development may this is not yet too late. For that standard parallelization is needed to add and may be also to jump into AI |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8168 Location: Salford, UK
|
Posted: Mon Dec 23, 2024 10:05 am Post subject: |
|
|
AI will access and use online help files so any advance will depend on the quality of these files. In that sense there is no direct link between AI and a compiler such as FTN95. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Wed Dec 25, 2024 12:52 pm Post subject: |
|
|
I mean to participate in all AI developments involving Fortran. There are several very active ones. For example this one called Modern Neural Fortran.
https://github.com/modern-fortran/neural-fortran
and some others
That will involve modern programmers into this compiler. Currently FTN95 gathers probably all living descendants of infamous Luddites in the world who do work on a single core and do not care. Sects of orthodox Fortran4 and Fortran77 most probably also are hidden here. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Thu Mar 06, 2025 12:15 am Post subject: |
|
|
1) I need both Y numbering and captions be outside the plotting area.
Can not find how in Designer's Mode to fix this plot. ("Designer's mode" or DM appears when you click on left corner icon which appears on your %PL plot when you add to your source code this line
call winop@('%pl[file=Settings.set]' )
Looks like people do not know what Designer's mode is. But it ultimately simplifies creating plot, and not just dumb plots but professionally looking plots. Nothing in the world is simpler than DM with %PL. You just write two Fortran lines and you created a plot where you are free to change anything without further programming. Just two lines!
I think there exist control to fix this problem regular way (outside the Designers mode) but i forgot it and could not find now.
And i need also that the X caption be centered on axis. There exist description in Clearwin ENH text file how to do that outside the Designers more but to me permanently in hurry it looks confusing. This option has to be default by the way. No one ever needed the current default you can see above ( of course i can move the caption in DM with 1000 clicks but...I do not have to). Am i wrong? Can people here confirm that? And this also needs to be added to DM
2) In the Designers mode the field for the line number is too small so that it can not show two digit line numbers. Besides you can not change this line number manually, only by clicking. Very annoying when you have many lines to change something.
Same, you can not just write the number in Tic Value Position controls, you need clicking and clicking
3) If you have log_linear plots and need to set minimum and maximum in Designer's Mode there is no way to write your limits like this 1.e-22 or 4.e30. You can do that only by writing it this way 0.00000000000000000001 or 40000000000000000000000000000000
4) Missing left frame in above plot (or left Y axis) is also obvious despite in DM both the frame, framed and etched radiobuttons are ON.
5) Other defects are visible on these two examples of two-line codes inside single file.
Code: | use clrwin
parameter (N = 2*2*2)
real*8 X(N), Y(N)
Data X/0.01,0.1,1,10, 100,1000,10000,100000/
Data Y/0.011,0.044,0.33,2.2,66,3333,1111,777/
!... Regular Plot
call winop@("%pl[x_axis='X Axis Title',y_axis='Y Axis Title']")
i=winio@('%ww%pv%pl[native,x_array,scale=log_log,N_GRAPHS=1]%lw', 800,600, n, X, Y, ilw)
!... Design Mode Plot
i=winio@('%sf%ts%bf%es&', 2d0)
call winop@("%pl[x_axis='X Axis Title',y_axis='Y Axis Title',file=zSetts.set]")
i=winio@('%ww%pv%pl[native,x_array,scale=log_log,N_GRAPHS=1]', 800,600, n, X, Y)
end |
Two plots will be opened (one on top of the other, so separate them yourselves) , one in "dumb mode" and another in Designer's Mode. You can edit the second plot by clicking on icon in left top corner. You can change there line width, add frame, its width, change min and max values, move titles reduce and increase fonts etc
And look at birth defects too: look at Minimum and Maximum values in Designer mode. They are still shown as log10 numbers instead of being human readable ones like when the Native PL was born.
By the way you can change the defect of Y axis dumb numbering by setting there Y minimum number to -2 (means 10^-2).
Just two-three lines.
No more formatting like this:
call winop@ ('%pl[x_min=7500]')
call winop@ ('%pl[x_max=7710]')
call winop@ ('%pl[y_min=0]')
call winop@ ('%pl[y_max=130]')
call winop@ ('%pl[x_axis=X]')
call winop@ ('%pl[y_axis=SEQNUM]')
call winop@ ('%pl[color=black]')
call winop@ ('%pl[link=lines,symbol=0]')
i=winio@ ('%`pl&',iwvm,ihvm,numld,xval,yval,ighandle)
call winop@ ('%pl[x_min=7500]')
call winop@ ('%pl[x_max=7710]')
call winop@ ('%pl[y_
Last edited by DanRRight on Sun Mar 16, 2025 9:38 am; edited 3 times in total |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8168 Location: Salford, UK
|
Posted: Thu Mar 06, 2025 8:17 am Post subject: |
|
|
Dan
I can probably investigate these issues but I am only willing to look at them one issue at a time. When I have reported a fix for one issue then you can send me the next.
Please send me a sample program and details for the first or most important issue. |
|
Back to top |
|
 |
Kenneth_Smith
Joined: 18 May 2012 Posts: 797 Location: Hamilton, Lanarkshire, Scotland.
|
Posted: Thu Mar 06, 2025 1:35 pm Post subject: |
|
|
Dan, try this for your y_min problem.
Code: | use clrwin
parameter (N = 2*2*2)
real*8 X(N), Y(N)
Data X/0.01,0.1,1.0,10.0, 100.0,1000.0,10000.0,100000.0/
Data Y/0.011,0.044,0.33,2.2,66,3333,1111,777/
! n_graphs must be first when using these winop functions
call winop_int@('%pl[n_graphs]', 1)
! set ymin
call winop_flt@('%pl[y_min]',10.d0**INT(FLOOR(LOG10(minval(y)))))
call winop@("%pl[x_axis='X Axis Title',y_axis='Y Axis Title']")
i=winio@('%ww%pv%pl[native,x_array,scale=log_log]%lw', 800,600, n, X, Y, ilw)
end |
It will not work correctly in your case for the x_min value as X(1) is initialised to 0.0099999997764826 |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Sat Mar 08, 2025 10:58 am Post subject: |
|
|
Guys, I think i was not clear. I do not need to fix anything or do any workarounds in my question 1. The problem was already articulated and fixed by including some additions to Clearwin syntax, and i even used that before but i forgot how to make Y axis on the left edge not in the middle (and numbering there too)
And same i think was already done for X caption - with the new syntax it will be placed in the middle of the whole axis, not on the positive its part only like you can see above (these are defaults which both are hell ugly - don't you see that on my plot example above ?)
I was not clear with other questions 2-5 too. My poor Uglish killing me (ones I incorrectly translated word trying to say that we go to some place visiting relative and used word "moving" which people understood as "relocating" which caused terrible consequences for the pets we left them to temporally babysit for a week ;-( ). These are obvious suggestions to improve Designer's mode, no more examples from me needed. Question 1 ideally also needs to be included in the Designers mode as an additional radio-button to its options
What Ken showed is classical workaround, all that trickery has to be included into the Designers Mode so users will not do any additional programming besides these 2-3 lines of Fortran code needed to start your plot. Why I refuse to use anything more than 2-3 lines is because all that additions besides these 2-3 lines often are conflicting with the Designers Mode. You will not see how DM scales anything or changes anything right away as you click there, the image just disappears. We need more users of Clearwin and its native PL to clean out such still existing hidden bugs |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Sun Mar 09, 2025 10:32 am Post subject: |
|
|
As to my Question 1 I finally realized how the manual confused me
"477 Two new options [xaxis=<caption>] and [yaxis=<caption>] have the added to %pl. These are like [x_axis=<caption>] and [y_axis=<caption>] but the captions are centred on the whole of the axis rather than the positive part."
Should be written to avoid confusion
"In addition to existing x_axis and y_axis two new options xaxis and yaxis have been added..."
But decently I'd prefer to see x_axis and y_axis centered on the middle of axis as a default and introduce 2 more options: centered to positive part x_axisP, centered on negative part x_axisN. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Sun Mar 16, 2025 8:51 am Post subject: |
|
|
Continuing suggestions to improve native %PL. All are relatively minor fixes and additions. There will be also one which is a major problem with LOG plotting (and recently I found also one with the linear scale too) but for a couple years I experience it I still had no time to make a demo
6) Would be great to make in Designers Mode additional keys to have the axis numbering more consistent. I forgot the trick i discovered which allows to do that (it worked when you change the orders of winop@ commands). For example current numbering does not really looks good
Ideally would be to have numbering either
a) strictly scientific 10^X
b) strictly engineering 0.001, 0.01, ... 1, 10,100, 1000 (ideally with settings until what values to use engineering format (1000 or 10000 or may be at 100000)
c) and may be mixed (like today)
7) It is necessary to fix these two squares near 10^-5 in numbering
8eight) and the square at x and y axis corner nearby |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Wed Mar 19, 2025 6:27 am Post subject: |
|
|
9) Clearwin can do a lot of things Fortran users may even have no slightest clue that such things could be done in just few letters of Fortran source text.
You can change the style of the front panel for example by adding bitmap backgrounds.
You can make different your own backgrounds for the window or the plot areas. All that can be included into Designers mode too. You can even make a games using Clearwin.
And definitely modern generations will not even touch any ugly app made in Command Prompt anymore
One of things which can be also added to Designers more when time allows could be elimination of not only programming controls of Clearwin but even all these allow keys in Designers Mode where you can move axis left-right and up-and-down and do that just by mouse touch.
Here is my example made decades ago. Suppose I open my app and the left margin of it is distorting the texts.
Of course you can increase the margin by adding Clearwin command and recompile the code. Or if you use Designers Mode, you can fix its position by clicking 20-30 times in the right direction. But in my app you just step on axis with your mouse and drag it to right side.
The same method can be used for moving captions, titles, increasing/decreasing fonts, line widths and basically almost everything in addition to the current Designer's mode dialogs
10) Where is the error here and why the crash happened not just ignoring or using standard font?
UPDATE.
I found the error : the right ] parenthesis for %CA was missing. Still shouldn't this error be reported by the /check_winio at compile time I always use to find Clearwin errors? (By the way probably this switch should be ON by default) |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2908 Location: South Pole, Antarctica
|
Posted: Fri Mar 21, 2025 2:55 am Post subject: |
|
|
11) The names of linear and logarithmic plot type is confusing. Normally when you call something LogLinear that means Log for X axis and Linear for Y. In the %PL this is opposite to common sense and usual convention. See for example Lawrence Berkeley National Laboratory site
https://henke.lbl.gov/optical_constants/filter2.html
So would be reasonable to introduce two or three additional keywords which will turn naming convention to standard. In two cases (both X and Y Linear and both X and Y Log they coincide with existing one)
LinLin for both X and Y scales being Linear (instead or in addition to existing Linear )
LinLog with Linear X and Log Y (instead or in addition to existing LogLinear )
LogLin with Log X and Linear Y (instead or in addition to existing LinearLog)
LogLog for both Log X and Y ( same as existing LogLog ) |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8168 Location: Salford, UK
|
Posted: Fri Mar 21, 2025 8:12 am Post subject: |
|
|
I wonder if Google AI gives different results on this side of the "pond"...
Quote: | In a log-linear graph, one axis (usually the y-axis) uses a logarithmic scale. |
|
|
Back to top |
|
 |
|
|
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
|