REBOL Technologies

Important Question on DRAW Dialect Invalid Words

Carl Sassenrath, CTO
REBOL Technologies
7-Dec-2004

Article #0062
Main page || Index || Prior Article [0061] || Next Article [0063] || Post Comments || Send feedback

Now that the DRAW dialect uses REDUCE/only, you can write code like this:

view layout [bx: box effect [draw [pen red line 0x0 bx/size]]]

Here the word RED and path BX/SIZE are looked up from the REBOL context during the evaluation of the DRAW dialect.

However, a new issue arises. What if the DRAW block contains an invalid word:

view layout [bx: box effect [draw [pen red print 123 line 0x0 bx/size]]]

The word PRINT is not part of the DRAW block vocabulary, and it is a REBOL functional datatype - so an error results (a rule of REDUCE/only):

** Script Error: Invalid argument: print
** Where: view
** Near: print 123 line 0x0 bx/size

In older versions, the PRINT would be ignored.

Which do you think is better? Let me know what you think on the REBOL2 AltME world.

Post Comments

Updated 8-Mar-2024   -   Copyright Carl Sassenrath   -   WWW.REBOL.COM   -   Edit   -   Blogger Source Code