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 

Using Plato to create sample ClearWin+ code

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


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

PostPosted: Tue Nov 01, 2022 7:33 pm    Post subject: Using Plato to create sample ClearWin+ code Reply with quote

I have recorded a video for YouTube that illustrates new features in Plato.

This provides a mechanism for generating sample ClearWin+ code for the FTN95, gFortran and iFort compilers.

This sample code can be used to get started using a wide range of winio@/$ format codes.

Here is the link...

https://www.youtube.com/watch?v=WM8XgsLGneo
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Nov 02, 2022 10:33 am    Post subject: Reply with quote

Paul,
I can not follow this video because there is no "Fortran Compiler for x64" option in my Plato. I have latest 8.92
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 02, 2022 11:15 am    Post subject: Reply with quote

Dan

What is your version of Plato (from the "About Plato" dialog and the main Help menu).

If it's not available from the main Build menu and "Fortran compiler for x64" then it may still be available via the accelerator key Alt+X.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Nov 02, 2022 12:08 pm    Post subject: Reply with quote

Dan,

If ypu are starting PLATO from the taskbar, then to check what version you are running;
right click the plato icon in the task bar;
You should get a pop up and then again right click the plato icon in the pop up;
This should provide a properties option, which will show "Target" and "Start in"

What I find is that although I have updated FTN95 (in a new directory) the taskbar icon is pointing to an old version.

In a recent Plato, if you select the BUILD tab, there should be an option "Fortran compiler for x64..."
This is also available via "ALT X" in Plato from FTN95 Version 8.8

With Plato, I think gfortran is acessible via the path setting, but FTN95 is via the directory that PLATO starts (seen in properties above)
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 02, 2022 12:09 pm    Post subject: Reply with quote

John

Did you get my pm?
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Nov 02, 2022 12:18 pm    Post subject: Reply with quote

Was 5.40, updated to 5.51. As FTN95 it works but the option "Fortran compiler for x64" is grayed, Alt+X does not work.

UPDATE.
This was because i worked kind of quick way - i drag and dropped f90 file into the Plato, not going usual steps by New, Open, search for files etc. This worked ok with Build and Run with FTN95 but not with x64 which was staying gray.

But only when i started standard way with New Project, and gave it a name... then only "Fortran compiler for x64" and Alt+X bacame available


Last edited by DanRRight on Wed Nov 02, 2022 12:27 pm; edited 3 times in total
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 02, 2022 12:19 pm    Post subject: Reply with quote

You must select x64 on the toolbar to enable Alt+X.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Wed Nov 02, 2022 1:20 pm    Post subject: Reply with quote

1) Yes, it is x64 not grayed and all seems like it should be but still something is not working. Here is Build:

Code:

Compilation completed with no errors.
Linking...
c:/users/rigt/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.0.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\rigt\Documents\test3\CheckMate\x64g\clrwin.o:clrwin.f95:(.text+0x12ce): undefined reference to `__remove_idle_monitor'
c:/users/rigt/gcc/bin/../lib/gcc/x86_64-w64-mingw32/13.0.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\rigt\Documents\test3\CheckMate\x64g\clrwin.o:clrwin.f95:(.text+0x12ed): undefined reference to `__add_idle_monitor'
collect2.exe: error: ld returned 1 exit status
Linking completed.


2) As batch file compilation outside Plato with gFortran it works.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 02, 2022 2:02 pm    Post subject: Reply with quote

Dan

Do you call remove_idle_monitor$ or add_idle_monitor$?

They are not in my version of clrwin.f95.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu Nov 03, 2022 6:34 pm    Post subject: Reply with quote

No. Problems seems are due to differences in clrwin.f95, after update to your recent clrwin.f95 these errors disappeared.

But appeared 1 new one. Please try this code from your computer. To avoid confusion will remind the source was
Code:
    program aw
      use clrwin$
      integer i,c0,c1,c2
      integer(CW_HANDLE)::h1,h2,cwh1
      common h1,h2
      integer,external::child_func

      i=winio$('%pv%fr&',400,400)
      i=winio$('%ww[no_border]%ca[MDI frame]&')
      i=winio$('%mn[&Child]&',child_func)
      i=winio$('%lw',c0)

      i=winio$('%aw&',c0)
      i=winio$('%ww[no_border]%ca[First Child]&')
      i=winio$('%pv%30.3`cw[hscroll,vscroll]&',10,cwh1)
      i=winio$('%lw&',c1)
      i=winio$('%hw',h1)

      call set_max_lines$(cwh1,50)
      call cw_write$(10,'Hello there!')

      i=winio$('%aw&',c0)
      i=winio$('%ww[no_border]%ca[Second Child]&')
      i=winio$('%pv%gr[black,metafile_resize]&',200,200)
      i=winio$('%lw&',c2)
      i=winio$('%hw',h2)

      call draw_ellipse$(100,100,50,50,255)
    end

!--------------------------------------------
    integer function child_func()
      use clrwin$
      integer i
      integer(CW_HANDLE)::h,h1,h2
      integer hh
      common h1,h2
      h=clearwin_info$('FOCUS_WINDOW')
      hh=0
      if(h.eq.h1) hh=1
      if(h.eq.h2) hh=2
      if(hh.gt.0) then
        i=winio$('Window %wd is active %2nl%cn%`7bt[OK]',hh)
      endif
      child_func=1
    end
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
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