Re: Ambiguities in VRML-Syntax

Richard Rabbat ([email protected])
Sat, 02 Dec 1995 03:58:47 -0500


Mitra wrote:
>
> > > * SFBool according to ANSI-C: SFBools should also be TRUE if any value
> > > unequal 0 is detected.
> > No - TRUE is 1 FALSE is 0, any other value should be a syntax error
>
> I think ONLY TRUE/FALSE should be allowed for SFBools.
>
> That's a good idea, no numbers at all.
>Actually TRUE and FALSE do not really exist but they are something like:
#define TRUE 1
#define FALSE 0
so it would be better to leave the 0's and 1's which are things a programmer
would expect.
Together with that, being able to manipulate booleans as integers is such a
powerful tool. Not allowing 0 and 1 means going into an endless series of
pseudocode instructions like:

if (boolean variable = TRUE )
then ( set the whatever variable to 2
else ( set the whatever variable to 0)

which is much clumsier than saying:
whatever variable = 2 * boolean variable;

-- 
Richard Rabbat, Computer and Communications Engineer
Center for Educational Computing Initiatives
Massachusetts Institute of Technology

Email: [email protected], [email protected] mail : 1 Amherst Street E40-370, Cambridge, MA 02139 url : http://abelard.mit.edu/staff/Ricky.html phone: 1-617-252-1838 fax : 1-617-253-8632


  • Next message: Mike Heck: "Re: LANG Question regarding texture mapping"
  • Previous message: Mitra: "Re: BAD: Not True in EE Times"
  • Maybe in reply to: Chet Murphy: "Ambiguities in VRML-Syntax"
  • Next in thesad: John D. Gwinner: "Re: Ambiguities in VRML-Syntax"