Hi Xtian,
I believe the answer to 1 is something like:
(2 (2 8) ⊃
∆length)←'v×9454254955488E3'
Regarding Q2 I need more information how to reproduce. If I
remember correctly then characters in ⎕TF refer
to some IBM code page., There could be elements of the GNU APL ⎕AV
that are not in that
codepage (and not in the IBM ⎕AV).
/// Jürgen
On 03/28/2015 02:18 AM, Christian
Robert wrote:
)clear
CLEAR WS
⎕pw←500
)copy Convert2 ∆length
SAVED 2015-03-27 16:52:16 (GMT-4)
24 ⎕cr ⊃
┌2─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│┌5────┐
┌13──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
││meter│ 2┌2─┐ ┌2─┐ ┌2─┐ ┌2─┐ ┌2─┐ ┌5────┐ ┌2─┐
┌9────────┐ ┌6─────┐ ┌4───┐ ┌4───┐
┌4───┐ ┌4───┐ ││
│└─────┘ ││nm│ │um│ │mm│ │cm│ │dc│ │meter│ │km│
│lightyear│ │parsec│ │inch│ │feet│
│yard│ │mile│ ││
│ │└──┘ └──┘ └──┘ └──┘ └──┘ └─────┘ └──┘
└─────────┘ └──────┘ └────┘ └────┘
└────┘ └────┘ ││
│ │┌5────┐ ┌5────┐ ┌6─────┐ ┌5────┐ ┌4───┐ ┌→┐ ┌6─────┐
┌18────────────────┐ ┌14────────────┐ ┌8───────┐ ┌8───────┐
┌8───────┐ ┌10────────┐││
│ ││v÷1E9│ │v÷1E6│ │v÷1000│ │v÷100│ │v÷10│ │v│ │v×1000│
│v×9454254955488000│ │v×3.0856776E16│ │v×0.0254│ │v×0.3048│
│v×0.9144│ │v×1609.344│││
│ │└─────┘ └─────┘ └──────┘ └─────┘ └────┘ └─┘ └──────┘
└──────────────────┘ └──────────────┘ └────────┘ └────────┘
└────────┘ └──────────┘││
│
└∊───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│
└∊∊────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
My first first question is, is there any method to update the
formula into '∆length' for example
to change the 'v×9454254955488000' into for example
'v×9454254955488E3' in a single line assignement
without using any temporary variables ?
I though I can do that with the diadic '⊃' but did not succeed.
My second question is about ")dump sample" of this workspace (to
include it in this mail);
on reload of sample the '∆length' variable is different from the
original one.
See the first 4 lines of this email.
I've also seen some days ago "2 ⎕tf 'varname'" removing an "∊"
from what it supposed to do, may be related.
I Know that 2 questions in one mail is bad, but you can answer one
at a time.
Xtian.
∆length←'meter' (2 13⍴'nm' 'um' 'mm' 'cm' 'dc' 'meter' 'km'
'lightyear' 'parsec' 'inch' 'feet' 'yard' 'mile' 'v÷1E9' 'v÷1E6'
'v÷1000' 'v÷100' 'v÷10' 'v' 'v×1000' 'v×9454254955488000'
'v×3.0856776E16' 'v×0.0254' 'v×0.3048' 'v×0.9144' 'v×1609.344')
|