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

[REBOL] rugby XPi beta1/add-functions

From: pat665::ifrance::com at: 29-Jan-2002 22:59

Hi Maarten, When add-functions is used repeatedly with the same function. This fonction appears several times in the function list. Here is my code.
>> rx: context get-rugby-service tcp://192.168.1.53:8001 >> psw: "pat665" >> rx/remove-functions "pat665" [double]
== none Once removed the function cannot be used anymore.
>> rx/double 3
** User Error: Rugby server error: Unsupported function: [double 3] ** Near: make error! rejoin ["Rugby server error: Unsupported function: " mold statement]
>>
Restoring the double function is easy with add-functions
>> rx/add-functions "pat665" [double]
== none
>> rx/double 3
== 6
>>
Calling add-functions repeatedly seems armless...
>> rx/add-functions "pat665" [double]
== none
>> rx/add-functions "pat665" [double]
== none
>>
In fact experimentation shows that after three add-functions, the added functions really appears three times on the function list.
>> psw: "pat665"
== "pat665"
>> f-list: rx/functions? psw >> foreach f-name f-list [print f-name]
triple get-stubs exec-code add-functions remove-functions functions? start-profiling profile-data reset-profiler ping set-pass-phrase double double double
>>
However only one remove-functions suffice to remove the function.
>> rx/remove-functions "pat665" [double]
== none
>> rx/double 3
** User Error: Rugby server error: Unsupported function: [double 3] ** Near: make error! rejoin ["Rugby server error: Unsupported function: " mold statement] Patrick