I tried to specify a different PW like the below, but the with is still
limited to something close to 80:

        const PrintContext pctx( PST_NONE, Workspace::get_PP(), 1000 );
        Value_P cr_formatted = Quad_CR::do_CR( cr_level, *value, pctx );
        out << *cr_formatted;

What did I do wrong?

Regards,
Elias


On 21 May 2014 21:50, Elias Mårtenson <loke...@gmail.com> wrote:

> Cool. Thanks!
>
> And what if I want to output without any quad-CR style at all? (I.e. the
> default output style ]BOXING none). Is there a cr-style I can use for that?
> Is it 0?
>
> Regards,
> Elias
>
>
> On 21 May 2014 21:43, Juergen Sauermann <juergen.sauerm...@t-online.de>wrote:
>
>>  Hi Elias,
>>
>> done in SVN 281. I had to change your TraceData.cc due to the extra
>> argument.
>> I used PrintContext (style + ⎕PP + ⎕PW) instead of print width alone so
>> that other
>> output aspects can be controlled as well.
>>
>> /// Jürgen
>>
>>
>>
>> On 05/21/2014 02:54 PM, Elias Mårtenson wrote:
>>
>> 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
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>

Reply via email to