After playing around with some test programs ...I think I've got most of
that now.
I've "proved" that a let statement's result is visible ANYWHERE within it's
bounding parens but not outside of them and....

If we have
(do something to X)
(do something to Y)
(do something to X again)

I was hoping to define the scope of X locally by wrapping the lot with
(let X some_dummy_value

   the above 3 statements

)

but binding X to some dummy value casts that value in stone...invalidating
the thing altogether because you only get one go at assigning the value so
it's got to be the "proper" value which you might not know at new contrived
level I was hoping to introduce.

Is that right?

 I didn't know about if (: some_member)....or that I could just end a
function/method with e.g.

                    (if (gt0 (: first_ln_no))
                       (: first_ln_no)
                       Ln_no )

but really like this short and to the point syntax.

Again...thank you very much....I feel I've learnt a lot today.
Best Regards
Dean






On 31 January 2017 at 19:30, dean <deangwillia...@gmail.com> wrote:

> BTW
> > This *might* be what you need. I can't test it.
> Yes...it works perfectly!
>
> On 31 January 2017 at 19:15, dean <deangwillia...@gmail.com> wrote:
>
>> > This *might* be what you need. I can't test it.
>> That's fine.
>> Your comments are EXTREMELY helpful because as you correctly note I am
>> struggling with this.
>> I still don't understand some of things you mention so please bear with
>> me and I'll try narrow down the source of my misunderstanding.
>> Thank you for your help and example.
>> They are very much appreciated.
>> Best Regards
>> Dean
>>
>>
>> On 31 January 2017 at 18:31, Alexander Burger <a...@software-lab.de>
>> wrote:
>>
>>> On Tue, Jan 31, 2017 at 07:14:57PM +0100, Alexander Burger wrote:
>>> > The only place where it is good is the line (setq Ln (pack " " Ln)).
>>> For the
>>> > rest all 'setq's can be simply omitted if you fix the conditional flow.
>>> >
>>> > Try it! :)
>>>
>>> OK, could not resist ;)
>>>
>>> This *might* be what you need. I can't test it.
>>>
>>>    (dm ln_completes> (Ln Ln_no)
>>>       (if (gt0 (: first_ln_no))
>>>          (setq Ln (pack " " Ln)) )
>>>       (=: buf (or (: new_buf) (: hdngs)))
>>>       (if (member Ln (: buf))
>>>          (prog1
>>>             (if (gt0 (: first_ln_no))
>>>                (: first_ln_no)
>>>                Ln_no )
>>>             (reset> This) )
>>>          # not a member
>>>          (=: new_buf (fltr_mtchng_hdng_rmndrs Ln))
>>>          (if (: new_buf)
>>>             (if (=0 (: first_ln_no))
>>>                (=: first_ln_no Ln_no) )
>>>             (reset> This) )
>>>          0 ) )
>>>
>>> ♪♫ Alex
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>>
>>
>>
>

Reply via email to