Hi Carl

Just trying to figure out your context test and noticed that recycle causes
an invalid page fault under Win98 Core 2.3 when running this script.

REBOL [
 Title: "Carl's context test"
 File: %context.r
 Date: 20-Jul-2000
]

b: function [][b] [
 make object! [
  b1: make object! [a: "Time"  b: [a]]
  b2: make b1 [a: "for you"]
  b3: make b2 [a: "to leave!"  b: does [a]]
  set 'b [b1 b2 b3]
  get-it: func [b] [get in b 'b]
 ]
 b
]

var: []
foreach b b: b bind [append var get-it get b] first b
recycle     ;recycle here causes crash when doing print
print var

Wondering if there is a simple explanation for this?  Seems like something
about the context referencing is destroyed by recycle.

-Larry

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 20, 2000 10:10 AM
Subject: [REBOL] REBOL SCOPING / CONTEXT EXPLANATIONS Re:(2)


> Good explanation. Fun with contexts. I like the "do" not "try" zen yoda
thing.  Nice touch.  Here's the next one to zen.  "Fetch these objects from
my hand..."
>
> b: function [][b] [
> make object! [
> b1: make object! [a: "Time"  b: [a]]
> b2: make b1 [a: "for you"]
> b3: make b2 [a: "to leave!"  b: does [a]]
> set 'b [b1 b2 b3]
> get-it: func [b] [get in b 'b]
> ]
> b
> ]
>
> var: []
> foreach b b: b bind [append var get-it get b] first b
> print var
>
>
> Sorry, too little sleep and not enough indefinite extent
> makes me write like perl.  Nah...
>
> -Carl
>
> PS: Actually, explain it, and there's not much left to say.
> Really!  Plus, MIT will throw in a Master's Degree for you.
>
> Hint: it's much easier to explain than it looks. But, you've
> got to use a dialect to do it.  (Now I'll be quiet.)
>
>

Reply via email to