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

[REBOL] Re: Changing prompt without feedback

From: rebol::techscribe::com at: 14-Nov-2000 11:23

Hi Joel,
> One (awkward, IMHO) way to sidestep this is with the following kludge > > >> do [system/console/prompt: "Huh? " prin ""] > Huh? blort: 3 > == 3 > Huh? > > based on the fact that DOing a block returns the value of the last > expression in the block (and PRIN doesn't have a return value). >
Simpler yet:
>> system/console/prompt: "$ " halt
$ You don't need the do and block combination. Result is the same because REBOL returns the value of the last expression of your input only, as in
>> 3 4 5 6 7 8 9
== 9 Elan