Silverfrost Forums

Welcome to our forums

Using Plato to create sample ClearWin+ code

1 Nov 2022 6:33 #29549

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

2 Nov 2022 9:33 #29556

Paul, I can not follow this video because there is no 'Fortran Compiler for x64' option in my Plato. I have latest 8.92

2 Nov 2022 10:15 #29558

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.

2 Nov 2022 11:08 #29559

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)

2 Nov 2022 11:09 #29560

John

Did you get my pm?

2 Nov 2022 11:18 (Edited: 2 Nov 2022 11:27) #29561

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

2 Nov 2022 11:19 #29562

You must select x64 on the toolbar to enable Alt+X.

2 Nov 2022 12:20 #29563
  1. Yes, it is x64 not grayed and all seems like it should be but still something is not working. Here is Build:

    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.

2 Nov 2022 1:02 #29564

Dan

Do you call remove_idle_monitor$ or add_idle_monitor$?

They are not in my version of clrwin.f95.

3 Nov 2022 5:34 #29570

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

    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
Please login to reply.