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 ?

Post by Daniel Ouellette »

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 ?

Post by Daniel Ouellette »

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 ?

Post by Daniel Ouellette »

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: 1923
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Question about Inp ?

Post by Imortis »

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 ?

Post by Daniel Ouellette »

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 ?

Post by Daniel Ouellette »

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: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Question about Inp ?

Post by MrSwiss »

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 ?

Post by Daniel Ouellette »

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 ?

Post by Daniel Ouellette »

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.
Post Reply