Question about Inp ?

New to FreeBASIC? Post your questions here.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 10, 2021 19:17

Sorry to contradict you, but I would have liked to replace it by a simple Sleep, which in fact does not work. The execution time of INP(&h3DA), which can reach 17 ms, is the same as Screensync and has the same effect, not Sleep which I had tried before with an equivalent time and with different times.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 10, 2021 19:23

Maybe I am very lucky because it works by Hazard only with my program. Beginner's luck.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 10, 2021 19:39

It would be interesting if someone would try it on their side, just to see if it's only illusory on my side.
Imortis
Moderator
Posts: 1793
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Question about Inp ?

Postby Imortis » Sep 10, 2021 19:41

Daniel Ouellette wrote:It would be interesting if someone would try it on their side, just to see if it's only illusory on my side.


Send us the code and we would be glad to test. Without code we cannot make a proper test.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 10, 2021 19:53

I understand, but my program that I have modified over the years and over several years has almost 10,000 lines. I'm afraid it's because of a lot of other things that it works because now I doubt myself since your comments. So, I think it would be better if you tried it your way and as simple as possible, that would confirm more that it really comes from that and if it really works, that is, it doesn't depend on other things as well. Otherwise, we'll leave it at that.

Just replace Screensync with "A = INP(&h3DA)" from any program. It is necessary to make the right tests.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 10, 2021 20:48

I just wanted to share with you all what I had discovered and not to help me debug my program if that is the case. I thought it would be interesting for you to know the effect of this INP.
MrSwiss
Posts: 3891
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Question about Inp ?

Postby MrSwiss » Sep 10, 2021 21:19

Daniel Ouellette wrote:... what I had discovered and not to help me debug my program ...
This is NOT a discovery, a bug, a flaw or feature.
It's far more a case, when someone doesn't have the necessary experience, with the FB-language.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 10, 2021 21:24

Sorry to come back to this, but I will send you something simple in a few days.
Daniel Ouellette
Posts: 96
Joined: Apr 17, 2011 17:43
Location: Montréal, Canada
Contact:

Re: Question about Inp ?

Postby Daniel Ouellette » Sep 12, 2021 14:06

It doesn't really matter if "A = Inp(&h3da)" can do the same thing as Screensync because it is Screensync that should be used. I also did some tests with Sleep instead and it doesn't work so bad in other simpler programs. So it is because of my program that Sleep works less well there. So, one could say that everything is ok.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 6 guests