> At 13:45 -0800 19/01/02, Kerry Thompson wrote:
> 
> >ASCII 0 is null, but Director won't tell you that.
> 
Jakob Hede Madsen wrote:

> Which "null"?
> 
ASCII null, not Director null ^_^

The American Standard Code for Information Interchange (ASCII), proposed
in 1963 by ANSI, and finalized in 1968, defines 0 as 'NUL'

Jakob is right regarding Director. The Director implementation of null
is inconsistent and poorly documented.

Director's implementation of void is also lame, and needs to be fixed.

Perhaps there is some confusion about null and void? They are not the
same. A variable can have a value of null. That's an actual ASCII (and
ANSI) character value. You should be able to do boolean operations,
variable assignments, etc., using null.

x = numToChar(0)
y = numToChar(0)
put x
-- ""
put charToNum(x)
-- 0
put y
-- ""
put charToNum(y)
-- 0

put x = y
-- 1
That's consistent, and correct. The use of void is another story.

Void is the absence of a value, and undefined variable. That's an
important distinction--0 is a value, void is not.

x=void
put x
-- <Void>
put voidP(x)
-- 1
So far, so good. But it starts getting screwy when you dig deeper:
NumToChar on a void should be undefined. This should probably return an
error:
put numToChar(x)
-- ""
put numToChar(void)
-- ""
Ok, we can live with that. But, charToNum(void) does return an error.
Also, when you mix null and void, it gets stranger:

x=null
put x
-- <Void>
put voidP(x)
-- 1

That's clearly an error--x is null, not void. And, digging further:

x = numToChar(0)
put x
-- ""
put charToNum(x)
-- 0
put voidP(x)
-- 0

So obviously something is out of whack. I'm reporting this as a bug.

Cordially,

Kerry Thompson
[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/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