> I'm having problems using the "get-word" concept.
>   (WinNT4 using console from View3)
> 
>  Rebol user guide has a "print-body" function using get-word.
> 
>   
>      print-body: func [:fun] [second :fun]
> 
>      test: func [x] [x + 3]              ;my simple test function
> 
>      print-body test   ==>   [x + 3]     ;neat
> 
>  This seems like a great way to access a function's code without
> evaluating it.  And if I replace the block  [second :fun]
> 
> print-body: func [:fun] [pick :fun 2]
>  print-body test  ==>   [x + 3]
> 
> print-body: func [:fun] [probe :fun] 
>  print-body test  ==>   func [x] [x + 3]
> 
>  I get expected behavior.
> 
>  But !!
>   print-body: func [:fun] [print :fun] 
>  print-body test  ==> ?function? 
>  
>  And :
>        print :test  ==>    ?function?
>   

Yes. OK.  [print test]  would execute the function.
[print mold :test]  or  [probe :test gives the source]

>  And worse if I try:
>               print first :test  ==>  CRASH
> 

yes. me too. i get crashes with something like   [get first first :test ]. 
[first first :test]   and   [mold first :test]  works, 
and more we should not know :)

>  I get a crash with a Dr. Watson window saying:
> 
>   Exception: access violation [0xc0000005],Address 0x00404326
> 
>  This is a repeatable response.
> 
>  Are there some special limitations on 'print or on use of get-word or
> is it just the peculiar interaction of these ??
> 
>  I have read what I can find about get-word but maybe someone can give
> me some additional help to explain my problem above.
> 
> Thanks, 
>         Don
> 
> 
> 

Volker

Reply via email to