replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - help with sleep1@
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 

help with sleep1@
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sat Apr 04, 2015 8:39 pm    Post subject: Reply with quote

Thanks but I haven't found easy and fortran to coincide much.
Plato catches my syntax errors and tells me what line but why is another matter. Sample code is REALLY needed for novices like me.

Run errors, forget it. The messages tell me nothing.

Clearwin+ will probably do the job from what little I've seen but may be overkill.

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



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

PostPosted: Sun Apr 05, 2015 10:21 am    Post subject: Re: Reply with quote

rogerh wrote:
Thanks but I haven't found easy and fortran to coincide much.
Roger


OK, i am in total Zeitnot lately but give me 10 examples of what you consider simple in programming outside Fortran and me or others here will show you that in 9 out of 10 cases Fortran will beat them in
- simplicity (more natural, intuitive syntax, smaller code size, availability of legacy math, natural sciences and engineering libraries and examples),
- quality (code reliability, depth of error diagnostics, debugging efficiency) and
- final code speed.
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sun Apr 05, 2015 2:39 pm    Post subject: Re: Reply with quote

John-Silver wrote:
maybe if you posted an example of the type of typical plot complexity you'll be trying to generate we could give you a 5-min opinions of if it's feasible with the %pl which Dan mentioned, or whether you should go from basics.
Just post an example of the most complex plot you would be generating (post one from the existing program generates and then if you think you'll need to improve it then do one in Excel for example so we can see what you're looking to achieve). Best approach if you don't want to waste too much time cause as Dan says, there are a few mines out there in 'Simpleplot' to be avoided.


Thanks but I've tabled the plotting for now. I'm leaving it up to the client as to how to proceed.

If he wants fortran to do it, I'll be back.
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sun Apr 05, 2015 3:04 pm    Post subject: Re: Reply with quote

Quote:

OK, i am in total Zeitnot lately but give me 10 examples of what you consider simple in programming outside Fortran and me or others here will show you that in 9 out of 10 cases Fortran will beat them in
- simplicity (more natural, intuitive syntax, smaller code size, availability of legacy math, natural sciences and engineering libraries and examples),
- quality (code reliability, depth of error diagnostics, debugging efficiency) and
- final code speed.


Whoa! I have no doubt you are correct for the most part. Remember, I'm switching to fortran for those very reasons. The only point I would argue is syntax. I've programmed in TrueBasic for many years (I'm 80 now) so it's syntax reads like english to me. Fortran is more terse in comparison.

For example in TB it's FOR i = 1 to 200. F95 doesn't have that. It uses DO i = 1,200. A minor difference but less readable. The IF statements are similar but fortran insists on logical comparisons while TB accepts math comparisons. Types are a particular sore point; TB doesn't require them while fortran is fanatical about it.

These are all differences of approach and no doubt fortran is superior. I'm not saying otherwise, I'm just commenting as a novice on things which make converting difficult.

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



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

PostPosted: Sun Apr 05, 2015 7:20 pm    Post subject: Re: Reply with quote

[quote="rogerh"]
Quote:

For example in TB it's FOR i = 1 to 200. F95 doesn't have that. It uses DO i = 1,200. A minor difference but less readable.


Well, to my eye it does not look more readable then Fortran because FOR and equal sign still are keywords and despite very small they meed clarification. I understand if it was
Code:
Do from 1 to 200

it would be indeed purely humanly readable. We would probably ask Paul to include that as an extension to lead this Fortran to be eventually almost humanly readable. Will be good marketing point by the way
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sun Apr 05, 2015 7:51 pm    Post subject: Reply with quote

DanRRight;

I agree but doubt it will happen here.

Personally I'd like to see programming in English. There are a couple of attempts such as Pegasus and Wolfram/Alpha but neither are near completion.

Roger
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sun Apr 05, 2015 8:26 pm    Post subject: Reply with quote

Hi John;

Along those lines I once wrote a fortran to basic translator which worked pretty well.

I also tried to write the programming in english program which died after the first command. WAY too many possibilities to manage.

Roger
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sun Apr 05, 2015 8:43 pm    Post subject: Reply with quote

John;

No Perl's a language of sorts but where do tadpoles and frogs get mentioned?

Roger
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Sun Apr 05, 2015 9:26 pm    Post subject: Re: Reply with quote

John-Silver wrote:
in Paul's reference to 'spawning' :O) ribet, ribet
whatever that is.


That's when one program starts another program. I don't know if F95 can do it.

Roger
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Mon Apr 06, 2015 10:54 pm    Post subject: Reply with quote

Woops!

Sleep1@ won't work either.

The client wants an interruptable sleep. The idea is to shut down the program yet be able to press a function key to reactivate the keyboard.

Any way to do this?

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



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

PostPosted: Mon Apr 06, 2015 11:26 pm    Post subject: Reply with quote

Decades from now Fortran will write formulas as they look in math books but today when we still need to code them, they look most natural only in Fortran. That what non-programmers (read 99.9% of people who need sometimes to code) appreciate. And this is why Fortran which was the first high level programming language will die as the last programming language. it's simplicity is a key. If you do not like TYPEs - do not use them, all that new additions to Fortran Standard are generally for those who must use programming daily.

Long ago I had comparison of the code written in Clearwin+ vs C++ which is this thread on this forum

http://forums.silverfrost.com/viewtopic.php?t=1429&highlight=trading+quotetracker

The difference was 10x in source size and uncountable in simplicity. Same with all other languages, see references there including VB and VB for Net. The Clrarwin+ is of course not a Fortran, but keeps the same mentality of fortraneers. You can try to compare these things yourself, i just checked, 7 years later they are still there in that link
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Tue Apr 07, 2015 6:11 am    Post subject: Reply with quote

Here's my shot at an interruptable wait routine.

It won't compile. Says DO is not labeled but END DO is.

I don't get it.

Roger

program keys

integer:: kv

do chk

call sleep1@(2)
call get_key (kv)
select case (kv)
case (0) ! NO KEY
exit select
case (27) ! ESC
exit check
case (368) ! F1
print *, kv
case default
end select

end do chk


end
Back to top
View user's profile Send private message
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Tue Apr 07, 2015 6:39 am    Post subject: Re: Reply with quote

rogerh wrote:

It won't compile. Says DO is not labeled but END DO is.


Change
Code:

do chk

to
Code:

chk: do

and try again.
Back to top
View user's profile Send private message
jalih



Joined: 30 Jul 2012
Posts: 196

PostPosted: Tue Apr 07, 2015 12:00 pm    Post subject: Reply with quote

Could you tell us more, what are you trying to achieve? Do you really need to sleep at all?

Why Perl needs to call Fortran routine? What Fortran routine needs to do?

If Fortran program needs to process some data file when its changed or created, then you could ask the file system to selectively notify you about changes.
Back to top
View user's profile Send private message
rogerh



Joined: 02 Nov 2014
Posts: 46
Location: Longmont, CO

PostPosted: Tue Apr 07, 2015 2:29 pm    Post subject: Reply with quote

Thanks!

This works. The problem was that I could find no explanation for naming the DO in the help file.


print *,"Start sleep"
chk: do

call sleep1@(2)
call get_key@ (kv)
select case (kv)
case (27) ! ESC
exit chk
case (368) ! F1
print *, kv
case default
end select

end do chk
print *,"End sleep"

Now I'll add things to do when the key is pressed.

Roger
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
Goto page Previous  1, 2, 3, 4  Next
Page 2 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