replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - C# and FTN95
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 

C# and FTN95

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
srfpala



Joined: 20 Aug 2014
Posts: 12

PostPosted: Tue Oct 07, 2014 8:08 pm    Post subject: C# and FTN95 Reply with quote

A. Using C# for Gui creation seems to be easier than using ClearWin+
Is it possible to write Fortran Functions and Subroutines that can be called from within a C# Program ?
If so, are there examples?

B. I think I read that a Clearwin+ code CD was available.
If so, where ?

BTW - I am thoroughly enjoying the Plato experience.

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


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

PostPosted: Wed Oct 08, 2014 7:13 am    Post subject: Reply with quote

If you have used the default installation process then you will find examples in C:\Users\xxx\Documents\FTN95 Examples\NET and C:\Users\xxx\Documents\FTN95 Examples\clearwin.

There is no CD that I know of.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Wed Oct 08, 2014 10:51 am    Post subject: Reply with quote

Paul,

The CD may actually be 'archaeology' or 'folk memory'. In the days of Salford Software FTN77, Clearwin was an add-on, separately purchasable (�50 if I remember). However, I imagine that it was a 3.5" floppy disk rather than a CD at the time.

While it may be true that a flavour of C with or without Clearwin+ could be a better way of programming a GUI than the combination of Fortran 95 and Clearwin+, the observation is of negligible value to someone who has programmed Fortran for four and a half decades, and regards C (in all its flavours) as anathema, and as incomprehensible as Sanskrit (or Klingon)! Such dinosaurs still exist ...

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



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

PostPosted: Wed Oct 08, 2014 10:27 pm    Post subject: Reply with quote

"Using C# for Gui creation seems to be easier than using ClearWin+"

Really? That's truly interesting...

Please post made in C# GUI source with similar elements as in this complete Fortran code written in Clearwin+

Code:
i=winio@('%ww%ca[win]%mn[File[Exit]]%th%dd%il%cn%`bg[yellow]%?7rd[index]%ff%nl%cn%bt[Exit]%ff','exit',1,1,0,10,j)
 end


Or plot the graph like in this single Fortran line example

Code:
Real*8 x(100),y(100);N=100;do i=1,N;x(i)=i;y(i)=i**2;enddo;i=winio@('%ww%pv%pl[x_array]',400,300,N,x,y);End


Or if time allows create this GUI made in Clearwin in minutes
Code:

  module all_defs
    use clrwin
    character (len=32) :: AppName, AppVer, AppAPIVer, Password,  ReqTypeL1(4)
    character (len=32) ::  SymbolsForL1, SymbolHist, ReqTypeHist(2)
    character (len=32) ::  FromDateTimeHist, ToDateTimeHist, fileSave_URL
    character ch_read_url*128, save64*64, tmp128*128
    real*8 FreqHistQuote
    integer IOlun, iTICK, iL1
    CONTAINS
    integer function cbGetHist()
    if(iTICK.eq.0.or.iTICK.eq.2) write (save64,'(e10.3)') FreqHistQuote
    if(iTICK.eq.1)               write (save64,'(e10.3)') 0.001
    ch_read_url='http://127.0.0.1:16240/req?GetHistory(DELL,9/02/2009,0,0.001,NO)'
    ch_read_url(39:)=' '
    ch_read_url=trim(ch_read_url)//trim(SymbolHist)//','//FromDateTimeHist(1:10)//&
                &','//ToDateTimeHist(1:10)//','//save64(2:10)//',NO'
    call READ_URL@(ch_read_url,fileSave_URL,0,ier)
    if(ier.eq.1) goto 1
    open(unit=21,file=fileSave_URL,STATUS='readonly', err=1)
    do i=1,1000000
    read(   21,'(a)',err=1,end=1) tmp128
    write(ioLun,'(a)')          tmp128
    enddo
 1  close (21,err=1)
    cbGetHist=1
    end function cbGetHist

    integer function cbGetVer()
    ch_read_url='http://127.0.0.1:16240/req?GetVersion()'
    call READ_URL@(ch_read_url,fileSave_URL,0,ier)
    if(ier.eq.1) goto 1
    open(unit=21,file=fileSave_URL,STATUS='readonly', err=1)
    do i=1,1000000
    read(   21,'(a)',err=1,end=1) tmp128
    write(ioLun,'(a)')          tmp128
    enddo
 1  close (21,err=1)
    cbGetVer=1
    end function cbGetVer

    integer function L1Quote()
    ch_read_url='http://127.0.0.1:16240/req?GetLastQuote(stock,stock,stock...)'
    ch_read_url(41:)=' '
    ch_read_url(41:)=trim(ch_read_url)//SymbolsForL1//')'
    call READ_URL@(ch_read_url,fileSave_URL,0,ier)
    if(ier.eq.1) goto 1
    open(unit=21,file=fileSave_URL,STATUS='readonly', err=1)
    do i=1,1000000
    read(21,'(a)',err=1,end=1) tmp128
    write(ioLun,'(a)')         tmp128
    enddo
 1  close (21,err=1)   
    L1Quote =1
    end function L1Quote
    integer function cbVoid()
    cbVoid=1
    end function cbVoid
   end module all_defs


Last edited by DanRRight on Thu Oct 09, 2014 8:09 am; edited 1 time in total
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Oct 09, 2014 8:07 am    Post subject: Reply with quote

Code:
!---------------------------------------------------------------------------
   program DEMO
    use clrwin
    use all_defs
   
    AppName='DEMO'
    ReqTypeL1(1)='SNAP';ReqTypeL1(2)='SUB'; ReqTypeL1(3)='UBSUB'; ReqTypeL1(4)='UBSUBALL'
    ReqTypeHist(1)='TICK';ReqTypeHist(2)='OHLC'
    SymbolHist='DELL'
    SymbolsForL1='MA,V,LVS,KBH,^IXIC'
    FreqHistQuote=1.
    AppVer='1.0.0'
    AppAPIVer='1.000'
    Password=' '
    iTICK=0; iL1=0
    ioLun = 11
    fileSave_URL= 'histQ'
    FromDateTimeHist= '2009/09/22'
    ToDateTimeHist  = '2009/09/25'

    i=winio@('%ww[no_border]%sy[3d_thin]%nr%nd&')
    i=winio@('%ac[Esc]&','exit')
    i=winio@('%sf%ts&',0.8d0)   
    i=winio@('%3.1ob&')
    i=winio@('  AppName%ff%14rs%ff&',AppName)
    i=winio@('  AppVer%ff%14rs%ff&',AppVer)
    i=winio@('  AppAPIVer%ff%14rs%ff&',AppAPIver)
    i=winio@('  Password%ff%14rs%ff %ff %ff&',password)
    i=winio@('   %^tt[Login]%ff&',cbGetVer)
    i=winio@('   %^tt[Clear]&',cbVoid)
    i=winio@('%cb&')
    i=winio@('  ReqType%ff%`15ls%ff&',ReqTypeL1,4,iL1)
    i=winio@('  Symbol%ff%16.5re%ff %ff %ff %ff %ff %ff %ff&',SymbolsForL1)
    i=winio@('    %^tt[LastQuote]%ff&',L1Quote)
    i=winio@('%cb&')
    i=winio@('  ReqType%ff%`15ls%ff&',ReqTypeHist,2,iTICK)
    i=winio@('  Freq%ff%16rf%ff&',FreqHistQuote)
    i=winio@('  Symbol%ff%15rs%ff&',SymbolHist)
    i=winio@('  From%ff%15rs%ff&',FromDateTimeHist)
    i=winio@('  To%ff%15rs%ff&',ToDateTimeHist)
    i=winio@('  %^tt[GetHistory]%ff&',cbGetHist)
    i=winio@('%cb%ff%nl&')
    i=winio@('%50.16cw[hscroll,vscroll]',ioLun)
   end
Back to top
View user's profile Send private message
srfpala



Joined: 20 Aug 2014
Posts: 12

PostPosted: Thu Oct 09, 2014 11:40 pm    Post subject: Using C# for Gui creation Reply with quote

Thanks for your work guys.
I'll be spending some time getting these examples to run.
Bob
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 -> Support 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