Page 1 of 1

PulseOut problem

Posted: 18 May 2010, 7:59 AM
by Paul Lamar
I can't seem to get this to work.
What am I doing wrong?

Re: PulseOut problem

Posted: 18 May 2010, 8:42 AM
by dkinzer
Paul Lamar wrote:What am I doing wrong?
If you change the For/Next to a Do/Loop, I think it will work fine.

As written, the For loop executes zero times. The reason is that the range of an Integer is -32768 to 32767. In this particular case the compiler doesn't give you warning that the value of 50000 can't be represented in an Integer value. The resulting code executes as if you had written:

Code: Select all

For x = 1 to -15536
Next x

Posted: 18 May 2010, 19:19 PM
by Paul Lamar
Thanks Don. Too bad. No out of range error.

I'll have to keep that in mind.I

Paul