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

[REBOL] Combining a word and a value in one argument

From: tim::johnsons-web::com at: 26-Sep-2000 18:12

Howdy: It would be great if I could have a function that would take a rebol word as an argument and print out both the word and it's value: i.e: test-int: 4 tst test-int
>>test-int: 4
This would be similar to a c function using the preprocessor stringizer as in #define PRINT(x) print(x,#x) print(int x,char* x_name) { return printf("%s: %d",x_name,x); } test-int = 4 PRINT(test-int); // gives test-int: 4 I tried playing with first system/words but couldn't come up with anything consistant. TIA -Tim