Yes, of course. :-) I was focused on the other solution to set a custom PW. Obviously adding pw as an argument to do_CR is a better idea.
Regards, Elias On 21 May 2014 20:52, "Juergen Sauermann" <juergen.sauerm...@t-online.de> wrote: > H Elias, > > that sounds more like making the print width a parameter of do_CR() > because the left arg of ⎕CR is already the first argument of do_CR() ? > > /// Jürgen > > > On 05/21/2014 02:33 PM, Elias Mårtenson wrote: > > To clarify, What I have is a Value, and all I want to do is to get a > string containing the printed form of that Value for a given > quad-CR-left-hand-value. I don't want the resulting string to be wrapped > (since I'm handling that on the Emacs side). > > Regards, > Elias > > > On 21 May 2014 20:29, Elias Mårtenson <loke...@gmail.com> wrote: > >> I mean the number to the left of quad-cr. :-) >> >> Regards, >> Elias >> On 21 May 2014 20:28, "Juergen Sauermann" <juergen.sauerm...@t-online.de> >> wrote: >> >>> Hi Elias, >>> >>> not sure what you mean by 'CR-level' ? >>> >>> /// Jürgen >>> >>> >>> On 05/21/2014 06:32 AM, Elias Mårtenson wrote: >>> >>> Hello Jürgen, >>> >>> I finally got around to attempting to implement this. >>> >>> What I'm actually doing is to ensure that the output in a trace buffer >>> (that displays the content of a variable in real-time) is not wrapped. This >>> is, of course, because Emacs allows you to navigate around a larger buffer. >>> >>> Currently, I'm simply calling the function do_CR which accepts a >>> number being the CR-level that I want to use for display. When using your >>> suggestion above, I effectively need to reimplement do_CR, which is >>> actually somewhat complex. >>> >>> Do you think it would be possible to alter the definition of do_CR so >>> that it accepts the CR-level as an argument so that I don't have to >>> copy&paste all that code into the Emacs module? >>> >>> Regards, >>> Elias >>> >>> >>> On 18 February 2014 18:36, Elias Mårtenson <loke...@gmail.com> wrote: >>> >>>> Thank you. This is a lot better. >>>> >>>> I was doing that just because I didn't see a better way to do it. >>>> Clearly, this is a better way to do it. :-) >>>> >>>> Regards, >>>> Elias >>>> >>>> >>>> On 18 February 2014 18:34, Juergen Sauermann < >>>> juergen.sauerm...@t-online.de> wrote: >>>> >>>>> Hi Elias, >>>>> >>>>> normally you do something like this: >>>>> >>>>> // const Value & value; >>>>> >>>>> PrintContext pctx(style, Workspace::get_PP(), Workspace::get_CT(), >>>>> Workspace::get_PW()); >>>>> PrintBuffer pb(value, pctx); >>>>> UCS_string ucs(pb, value.get_rank(), pctx.get_PW()); >>>>> ... >>>>> >>>>> You can use your own ⎕PW value instead of Workspace::get_PW() above. >>>>> >>>>> It is generally a bad idea if programs or functions other then the >>>>> interpreter itself modify the data structures >>>>> of the interpreter because the functions of the interpreter make >>>>> certain assumptions regarding the state of >>>>> its data structures. If other functions modify these data structures, >>>>> then it becomes impossible for me to >>>>> maintain the interpreter. >>>>> >>>>> /// Jürgen >>>>> >>>>> >>>>> >>>>> >>>>> On 02/18/2014 04:58 AM, Elias Mårtenson wrote: >>>>> >>>>> In my native code, I would like to be able to get a printable >>>>> representation of a Value_P as if ⎕PW was set to some very large >>>>> value (effectively unlimited). >>>>> >>>>> What is the most efficient way to do this? >>>>> >>>>> I was trying to call assign on the return value from >>>>> Workspace::get_v_Quad_PW(), but I got a DOMAIN ERROR (I suppose I >>>>> made some silly mistake somewhere though) but I don't think that might be >>>>> the best way to it. >>>>> >>>>> Regards, >>>>> Elias >>>>> >>>>> >>>>> >>>> >>> >>> > >