Just to illustrate what I meant...
: (let X 0
(for Y 3
(let X (inc 'X) (prinl X))))
1
1
1
-> 1

## Advertising

On 2 February 2017 at 18:16, dean <deangwillia...@gmail.com> wrote:
> Thank you very much for the advice....I've just used that and it's worked
> a treat....
>
> : (let X 0
> (for Y 3
> (inc 'X) (prinl X)))
> 1
> 2
> 3
> -> 3
> I did try my first example with lets instead of setqs but the second let
> kept looking at the first let value precluding any
> incrementation...ELIMINATING the second let and using just inc inc as you
> advised ....removes the problem by allowing just one let at the top which
> works great.
>
> Perhaps inc contains an inc somewhere otherwise how does X actually get
> changed but if it does...it doesn't look to be in a place that interferes
> with the first let.
>
> Irrespective...you've provided a very elegant solution to my problem and I
> thank you for it!
>
> On 2 February 2017 at 17:24, pd <eukel...@gmail.com> wrote:
>
>> I think this is not the use you intent
>>
>> In *my* opinion:
>>
>> On Thu, Feb 2, 2017 at 3:44 PM, dean <deangwilliam30@gmailcom
>> <deangwillia...@gmail.com>> wrote:
>>
>>>
>>> (setq Ln_no 0)
>>> (in Epic_txt_fl_pth
>>> (until (eof)
>>> (setq Ln_no (inc 'Ln_no) )
>>>
>>
>> this is redudant since you're simply incrementing the value of a global
>> symbol, simply write: (inc 'Ln_no)
>>
>>
>>> (prog....
>>>
>>>
>>
>> As a general not too exact rule setq creates global value while let
>> creates a local value
>>
>> More exactly setq (and set) binds a symbol to a value in the "global
>> context" while let binds a symbol to a value only inside the let expression
>>
>>
>