Thank you very much for the advice....I've just used that and it's worked a

: (let X 0
      (for Y 3
         (inc 'X) (prinl X)))
-> 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 doesn't look to be in a place that interferes
with the first let.'ve provided a very elegant solution to my problem and I
thank you for it!

On 2 February 2017 at 17:24, pd <> 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
> <>> 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

Reply via email to