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

[REBOL] Re: Back to the Advanced Port stuff again

From: al:bri:xtra at: 11-Jan-2001 7:31

> Not a problem since I know to look for "paul". But what if I didnt know
that Paul was assigned to name and that this was done dynamically during program execution. How what I probe the port to get this information. The general solution is to put your words in a special block just for this purpose. Something like:
>> name: "Paul"
== "Paul"
>> name: to word! name
== Paul
>> WaitPorts: make block! 0
== []
>> myport: open %test.txt >> set name myport
Caution: The above line really needs to be done in it's own context, not in Rebol's context. Consider: Name: "print" ... But I have to go to work now. Any one?
>> probe paul
make object! [ scheme: 'file host: none (escape)
>> append waitports 'Paul
== [Paul]
>> aport: first waitports
== Paul
>> probe get aport
make object! [ scheme: 'file (escape)
I hope that helps! Andrew Martin ICQ: 26227169