bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Calling Value::print() with different ⎕PW


From: Elias Mårtenson
Subject: Re: [Bug-apl] Calling Value::print() with different ⎕PW
Date: Tue, 18 Feb 2014 18:36:23 +0800

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 <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]