Yes, it's only good if you could normally evaluate that variable, so it'd 
need to be an integer, either a regular value or a true/false, as in my 
example.

It's not appropriate for all occasions, but it comes in handy for certain 
ones.  You do need to know your code.

Another good use is for passing in an optional specific value, as in:


on showSprite whichSprite
   if (whichSprite) then
     -- specific sprite requested
   else
     -- default to all sprites
   end if
end

In this case, if it was void, then we evaluate to 0, so no specific sprite 
was requested and we just do them all.

- Tab

At 04:46 PM 9/20/00 -0400, Carl West wrote:

>One gotcha I hit just minutes ago (synchonicity? serendipity? you decide):
>
>If the parameter you're passing is not an integer, you have to test to
>see if the parameter =/<> void, otherwise it barfs when you DO pass it a 
>parameter.
>
>Text, points, RGBs, rects, quads... none of these evaluate to either
>true or false on their own. It's gotta be an integer.


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to