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 

Hello ClearWin+
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Tue Jan 11, 2011 7:27 pm    Post subject: Reply with quote

I finally succeeded in getting something done in ClearWin+ Very Happy Using our existing numerical code it was quick in setting up this window - (getting to this is another story). The example reads a huge amount of data and then do a two-dimensional interpolation to find the parameters at the given operating point.

The coding is much easier than Matlab and by far easier to get it to run on a client machine (should it be necessary). However, beating the graphics from Matlab will be difficult (I think).

This example might be very simple. It saves time and it is brilliant to have a single tool to convert/read and evaluate the data! Some of my colleagues wil get a stroke if I tell them this is all Fortran Smile



Uploaded with ImageShack.us
Back to top
View user's profile Send private message
JohnHorspool



Joined: 26 Sep 2005
Posts: 270
Location: Gloucestershire UK

PostPosted: Tue Jan 11, 2011 11:49 pm    Post subject: Reply with quote

Jacques,

Quote:
"However, beating the graphics from Matlab will be difficult (I think)."


with ftn95 and clearwin+you can create graphics to match any other product using GDI (%gr) or OpenGL (%og). Yes the programming may become involved but it can be achieved.

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



Joined: 11 Apr 2005
Posts: 371

PostPosted: Wed Jan 12, 2011 9:31 am    Post subject: Re: Reply with quote

jjgermis wrote:
Some of my colleagues wil get a stroke if I tell them this is all Fortran Smile

Oooh, don't tell them that, cos it's not true. And you wouldn't want to compromise your newly-acquired reputation as a user interface architect by misleading your colleagues about the nature of the tool you used, now would you? ClearWin+is tightly integrated with one particular FORTRAN compiler, but it isn't FORTRAN, and it doesn't work with other FORTRAN compilers.

But you knew that ...
Back to top
View user's profile Send private message Send e-mail
LitusSaxonicum



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

PostPosted: Wed Jan 12, 2011 3:13 pm    Post subject: Reply with quote

Come on, tell us how you got a printer icon along with the other 3 on the top right of the caption bar ....

Better still, add the mystical invocation:

1 24 default.manifest

to your resources, and it will look like 21st century (XP or post XP, that is the question) Windows!

Sparge: As far as the code actually written by jjgermis is concerned, isn't it all standard-conforming Fortran, even all the Clearwin+ bits? What happens with libraries and interfaces can be in any language, and since the days of FTN77 which had large parts of itself allegedly written in Fortran, the libraries and compiler code aren't Fortran anyway. Or do you have a different definition?

Isn't it possible that since Clearwin+ is just a (sophisticated?) wrapper for calls to the Windows system, it could conceivably be converted to work with just about anybody's Fortran? Before anyone replies, I don't want it that way.

Eddie
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Wed Jan 12, 2011 5:31 pm    Post subject: Reply with quote

The printer icon comes from our Hardcopy program. The top-window then automatically gets the icon. This is useful to make a screenshot for documentation.

Perhaps I should express myself in another way: Using FTN95 and ClearWin+ I have a single development environment - GUI and numerics.

How do I implement the 1 24 default.manifest in Plato?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jan 12, 2011 5:44 pm    Post subject: Reply with quote

If it is the only resource then you can put it after the main program thus

RESOURCES
1 24 default.manifest

Otherwise add this as a new line to your existing resource script.
Back to top
View user's profile Send private message AIM Address
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Thu Jan 13, 2011 6:52 am    Post subject: Reply with quote

When I tried this I get the following error:
Quote:
H:\FTN95\Femag\BCH\src\MAIN.F90(424) : error 699 - Invalid character '2' at start of line
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jan 13, 2011 9:53 am    Post subject: Reply with quote

You will need a recent FTN95.

Alternatively you can put the line in a separate .rc file.
This can be referenced on the WINAPP line or compiled separately using SRC.exe.
Back to top
View user's profile Send private message AIM Address
sparge



Joined: 11 Apr 2005
Posts: 371

PostPosted: Thu Jan 13, 2011 1:18 pm    Post subject: Re: Reply with quote

LitusSaxonicum wrote:
Or do you have a different definition?
(re: what is and isn't FORTRAN)

It seems so, yes. I suppose my definition of something that might or might not be FORTRAN code would be something like "that which is compiled without error by all bug-free FORTRAN compilers". That the compilers were or were not written in FORTRAN seems to me to be irrelevant. Otherwise, you would by analogy have to say for example that a baked product made from dough is only "bread" if it is produced in an oven that is also made out of dough Confused

Libraries and interfacing to them is another matter!

I have been under the impression that code including ClearWin+ code (I confess I had only winio@ specifically in mind) would only compile without error using FTN95. However, now I come to think about it a little harder, I realise I do not know whether or not this is true. And that even if it is true, that does not mean my definition is good. I do not understand the division of labour between compiler, linker and runtime library anything like well enough.

I think I shall retreat to a purist position and say that I would define a program written in FORTRAN to be one for which the source code consists only of statements that consist only of standard FORTRAN keywords, variables, and calls to subroutines and use of functions that are also written in such source code. By which definition, I imagine they are rare beasts indeed, these days Very Happy
Back to top
View user's profile Send private message Send e-mail
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Mon Jan 17, 2011 8:47 am    Post subject: Reply with quote

I got some excellent tipps in this thread to get my ClearWin+ enthusiasm going. Comparing to my (little) GUI experience from Matlab and VB the philosophy is slightly different - I would say. However, for my applications just the right thing. Reaching a level of willing to try things out I can live with the scattered bits and pieces in the documentation.

There is however a few things I cannot figure out: What is the best way to print the results. The manual way that I am used to is to write the results to a file; open it with Wordpad and print.



Uploaded with ImageShack.us
Back to top
View user's profile Send private message
Smib



Joined: 26 Apr 2009
Posts: 22
Location: Melbourne

PostPosted: Mon Jan 17, 2011 12:28 pm    Post subject: Reply with quote

One way is o use a button to call a print function

Code:

           i=winio@('%^bt[ Hard copy output  ]&','PRINTER_OPEN',7,Print_func


         integer function print_func()

          write(7,*)' '
          write(7,*)' '
          write(7,90)
 90     format(5x,80('-'))
          write(7,91)
 91     format(20x,'Program Name  Demo print output')
          write(7,90)
          write(7,*)' '
         write(7,*)'                            Run on ',edate@(),' at ',time@()

etc
etc


          close (7)
         print_func=2

         end


This calls the standard windows printer dialog. The information that you want to print needs to be made available to the function (eg via a common statement)

Cheers
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Mon Jan 17, 2011 1:48 pm    Post subject: Reply with quote

Thanks! This is really easy Very Happy

Instead of setting the unit equal to 7 I tried a variable (write(ou,*)) - would like to control wheter it goes to the screen or printer. Using the code below I found that ou in (1;2;5;6) will cause the data to be written to the screen instead of a file.

Question: Are these unit numbers (1;2;5;6) default (or rather reserved) for the screen?

Code:
program cutandpaste

integer :: ou,io_err

do ou=0,20
  write(ou,'(I4,A)',IOSTAT=io_err) ou,'  Successful'
  if (io_err>0) then
    write(*,'(I4,A)') ou,'  does not work'
  endif
enddo
end
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Wed Jan 19, 2011 3:47 pm    Post subject: Reply with quote

If your output always has a physical meaning (e.g. I see you have "torque" and "bore diameter" which look physical to me) why not draw a picture of it, with dimensions, arrows etc. Then make optional output (a) graphical, (b) textual. Users tend to prefer (a) over (b).

After decades of sending printouts to a page printer, line printer or character-by-character printer or to a file, I now find the pictures more concise and easier to read, besides which, they create less waste. Even if you have to print a picture, the total number of pages to print and store should be less.

A picture is worth a thousand words!

Eddie
Back to top
View user's profile Send private message
jjgermis



Joined: 21 Jun 2006
Posts: 404
Location: Nürnberg, Germany

PostPosted: Wed Jan 19, 2011 4:27 pm    Post subject: Reply with quote

Eddie, I agree with the idea of a picture. However, since I am at the beginning of exploring the possibilities ClearWin+ has to offer it will take another while Very Happy

Another advantage of a picture is that one has a visual test of e.g. the machine dimensions (in our case). Often this leads to much quicker results than by evaluating the "text numbers".

In a previous thread I got some very useful tipps how to handle pictures! However, handles in ClearWin+ are a still a black box to me.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Wed Jan 19, 2011 11:12 pm    Post subject: Reply with quote

Back in June 2009 I started a thread called "When is a handle not a handle", to which Paul added some useful notes. (And I put it in Suggestions accidentally). Sometimes you give a handle, sometimes you get a handle. To know which, you have to read FTN95.CHM VERY carefully!

Eddie
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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