|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] How to set the screen width in APL interpreter |
Date: | Sun, 25 Dec 2016 16:34:09 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi Alexey, I applied your patch (almost). The patch didn't quite work because the workspace is created before the command line arguments are parsed (so that another )CLEAR was needed before the --PW value would be used, and the value did not survive )CLEAR as described by IBM. I have fixed both in SVN 828. Before we continue converting every system variable into a command line option, please note that ⎕ARG gives you access to all command line arguments of GNU APL. So setting ⎕PW from ⎕ARG in your ⎕LX function would have had the same effect as the patch. Alternatively, ⎕ENV gives you access to the environment variables when GNU APL was started, which might be even better than a command line option. /// Jürgen On 12/25/2016 10:24 AM, Alexey
Veretennikov wrote:
Hi, Yes I understand your reasoning. I've searched about ⎕PW behavior in IBM Reference manual as well as tested its behavior with Dyalog APL. As it states in IBM Reference Manual ⎕PW is a session-wide variable, therefore I guess should not be attached to the workspace. In Dyalog APL according to my experiments it is the case. So I've taken the liberty to implement the command-line argument to set the value of ⎕PW system variable as "--PW value", so the users who know their terminal width (like I am since I'm running the terminal with command line geometry option) could set the appropriate width. I've also modified Archive to not to load this variable from workspaces and use default one (or provided in command line argument) to comply with IBM APL reference manual. Kindly see the patch attached. |
[Prev in Thread] | Current Thread | [Next in Thread] |