Difference between revisions of "Yield"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "<c>yield</c> pauses the execution of the script until the next "tick" of the host app. === Arguments === {| class="wikitable" |- ! Parameter Name !! Default Value !! Meaning...")
 
m (Added See Also links)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<c>yield</c> pauses the execution of the script until the next "tick" of the host app.
 
<c>yield</c> pauses the execution of the script until the next "tick" of the host app.
  
=== Arguments ===
+
In Mini Micro, for example, this waits until
 +
the next 60Hz frame.  Exact meaning may vary, but generally
 +
if you're doing something in a tight loop, calling <c>yield</c> is
 +
polite to the host app or other scripts.
  
{| class="wikitable"
+
See also: [[time]], [[wait]]
|-
 
! Parameter Name !! Default Value !! Meaning
 
|-
 
| ''paramnamd1'' || type || description
 
|}
 
 
 
 
 
== Example ==
 
 
 
<ms> In Mini Micro, for example, this waits until
 
the next 60Hz frame.  Exact meaning may very, but generally
 
if you're doing something in a tight loop, calling yield is
 
polite to the host app or other scripts.</ms>
 
  
 
[[Category:Intrinsic Functions]]
 
[[Category:Intrinsic Functions]]

Latest revision as of 13:23, 29 March 2021

yield pauses the execution of the script until the next "tick" of the host app.

In Mini Micro, for example, this waits until the next 60Hz frame. Exact meaning may vary, but generally if you're doing something in a tight loop, calling yield is polite to the host app or other scripts.

See also: time, wait