|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Calling Value::print() with different ⎕PW |
Date: | Thu, 22 May 2014 15:10:50 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130330 Thunderbird/17.0.5 |
Hi Elias,
if the values was a matrix then you may have another problem that the matrix has no \n at the end of each row (not sure how your output is supposed to look like). Let say do_CR returns Value_P Z (which can be a scalar, a vector, or a matrix depending on the value ⎕CRed and the first arg of do_CR(). Then there are two options: 1. Check the rank of Z with Z->get_rank() and loop(z, Z->element_count()) { out << Z->get_ravel(z).get_char_value(); // insert \n as needed, i.e. z%Z->get_last_shape_item(); } 2.Construct a PrintBuffer object from Z (with ⎕PW as needed) and out << PrintBuffer object; I haven't tested this; 1. seems more reliable (and definitely faster) while 2. looks more elegant. /// Jürgen On 05/22/2014 02:46 PM, Elias Mårtenson wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |