Page 1 of 1

More manual information re #.delay()

Posted: Wed Sep 27, 2017 8:55 pm
by rbytes
I was experimenting with #.delay() while porting the Turtle Graphics program into SPL. Some graphic operations require a very slight slowdown between iterations. While testing, I found that values less than #.delay(.001) had no effect on the program execution. If indeed .001 is the smallest possible delay, perhaps this should be mentioned. If delays are calculated in thousandths of a second and this info is included in the manual, then programmers would realize that .0009 is no delay at all, and there is no difference between delays of .0044 and .004

Re: More manual information re #.delay()

Posted: Wed Sep 27, 2017 9:15 pm
by Mr. Kibernetik
Thank you for your note.
Yes, currently #.delay precision is 1 millisecond.
Probably I need to increase #.delay precision.

Re: More manual information re #.delay()

Posted: Wed Sep 27, 2017 10:20 pm
by rbytes
That would be useful. Right now I am caught between a too-slow delay of .001 and a too-fast delay of .0005 which seems to equal no delay.

Re: More manual information re #.delay()

Posted: Thu Sep 28, 2017 4:58 am
by Mr. Kibernetik
#.delay precision will be improved in version 0.0.23.

You can create small delays by executing empty code, for example:

Code: Select all

delay(x)=
  > i, 1..x
  <
.
Of course this is not a time-based delay, but it can give as small delays as you need.

Re: More manual information re #.delay()

Posted: Thu Sep 28, 2017 5:14 am
by rbytes
That is very helpful. Thanks.