From: Bob D. <bd...@si...> - 2003-11-05 21:32:15
|
On Wed, 2003-11-05 at 15:40, John Buckman wrote: > This is a useful feature, but with rlib getting more scripted, it seems to me that it's not as crucial. > > It also seems like you could make it portable by changing the way it works to instead be a char[]* array, of alternating key/values, and just have the pointer to that in the rlib *r. That's just a little more work for you, but should work across languages. > > I would love a way to display today's date in a report -- I didn't see a way to do that. Its really easy to add new functions to rlib... put an entry into the rlib_pcode_verbs table in pcode.c you also need to add a OP code define in pcode.h then you implement the function (that you gave a pointer to in the rlib_pcode verbs) in pcode_op_functions.c It would be a 5 minute exercise if you want to try it hint: just copy the "stod" operator... just don't pop any value off RLIB's stack.. just push on a date... I would call it "date" - Bob > > -john > > > > a current feature in RLIB is that is can pick up memory variables from > > your environment and put them in a report... > > > ie.. > > > in php: > > > $start_date = "2003-01-01" > > > so then in RLIB you can: reference it as m.start_date > > > I'm going to add a function: > > > rlib_add_memory_variable(rlib *r, char *name, char *value); > > so that in C you can add the variable in.. and you will have the same > > function in all languages (php, python.. ect) > > > However.. this is not portable accross a lot of languages rlib is going > > to bind to... so I have a choice and you can vote: > > > I can either leave this feature in.. or I can take it out.. The goal of > > rlib is you can drop it in any language and get the same report with > > VERY VERY little effort.... like there should almost be 100% api > > compatible... however.. this would be a difference > > > opinions? > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > Does SourceForge.net help you be more productive? Does it > > help you create better code? SHARE THE LOVE, and help us help > > YOU! Click Here: http://sourceforge.net/donate/ > > _______________________________________________ > > Rlib-users mailing list > > Rli...@li... > > https://lists.sourceforge.net/lists/listinfo/rlib-users > > |