Re: VOID
- Posted by Mike Nelson <MichaelANelson at WORLDNET.ATT.NET> Oct 04, 2003
- 345 views
Euphoria should have a built-in dummy variable, I'd prefer to call it VOID as two major libraries use it. The variable VOID would be automatically defined in the interpreter and assignment to VOID would be legal, but would be a no-op. Any attempt to read from VOID would be a sytax error. The purpose of the type trickery in Diamond is to prevent meaningful data being illegitimately read from VOID. The built-in described above does it better. VOID wouldn't be necessary if it were possible to use functions as procedures, but I believe the dummy variable would be easier to implement. It also is more self-documenting: VOID=my_routine(1,2,3) makes it clear that my_routine is a function whose return value I'm choosing to discard, while my_routine(1,2,3) might be a procedure. -- Mike Nelson