Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: simple view question

From: brett:codeconscious at: 10-Apr-2001 17:19

First thing to say is that the layout function takes the VID dialect as input. A dialect follows a syntax that may be different from "normal" rebol code. The short answer is VID doesn't handle the print function because print does not return a value that VID expects. Going back to why the first example works. Well, read %file.txt returns a string and VID can use strings. Probe returns a value - the value that it was given so this works: view layout [ text "hello" probe "how do you do" ] and so does this view layout [ text probe "how do you do" ] and so does this bizarre-function: does [ for i 1 5 1 [print i] "bizarre function result"] view layout [ text bizarre-function ] Also note that VID allows a single (once only) evaluation of an arbtrary expression using the word do Like this: view layout [ text "hello" do [print "how do you do"] ] I hope that helps. Maybe someone else can put it more succinctly. Regards, Brett.