I do the exact same thing Peter. I learned this when I was developing for a
dBase accounting application. All their control structures and terminations
were commented quite extensively, and I was able to learn dBase and their code
specifically because they did.
Bob S
On Apr 30, 2016, at 06:31
> On Apr 29, 2016, at 9:17 AM, Mark Waddingham wrote:
>
> On 2016-04-29 04:30, Kay C Lan wrote:
>> On Thu, Apr 28, 2016 at 11:47 PM, Mark Waddingham wrote:
>>> From 7.0 onwards, this causes no problem as the engine takes a 'copy' of
>>> the target variable at the start of the loop. (Note you on
I generally do the same thing with nested repeats, but my comments are
different:
On Apr 30, 2016, at 2:13 AM, Kay C Lan wrote:
> On Sat, Apr 30, 2016 at 9:19 AM, Dr. Hawkins wrote:
>
>> Exiting an outer loop from within an inner takes
>> contortions, but figuring out which end is attached to
On Sat, Apr 30, 2016 at 9:19 AM, Dr. Hawkins wrote:
> Exiting an outer loop from within an inner takes
> contortions, but figuring out which end is attached to which if or repeat
> is time consuming.
>
> I know you've figured it out but for any noobs reading this and scratching
their heads here
lcStackbrowser has a feature that adds comments to each end xxx statement
identifying it's parent, part of the script assist module.
I think named ifs, repeats, etc would be great on the context of being able
to exit out of nested instances of those structures to whatever level you
want.
On Fri,
On Fri, Apr 29, 2016 at 5:40 PM, Alex Tweedly wrote:
> Do you simply want to *see with certainty", or do you want to use these
> tags (e.g. for exiting a control structure) ?
>
>
Both, actually. Exiting an outer loop from within an inner takes
contortions, but figuring out which end is attached
On 30/04/2016 00:49, Dr. Hawkins wrote:
The other thing I desperately want is the ability to tag loops, as in
Fortran, so that I can see with certainty which end goes with which
repeat or if.
Do you simply want to *see with certainty", or do you want to use these
tags (e.g. for exiting a contr
On Fri, Apr 29, 2016 at 2:19 PM, Bob Sneidar
wrote:
> The best place to get C style scoping is to use a C style development
> environment. Really. The last thing I want is to make Livecode MORE like
> all the dev environments I simply do not have enough life left to master.
Given it's nature, i
The best place to get C style scoping is to use a C style development
environment. Really. The last thing I want is to make Livecode MORE like all
the dev environments I simply do not have enough life left to master.
Bob S
On Apr 29, 2016, at 09:25 , Dr. Hawkins
mailto:doch...@gmail.com>> wro
On Fri, Apr 29, 2016 at 8:21 AM, Richard Gaskin
wrote:
> If you find yourself needing to clear variables of a particular scope,
> maybe that's reason to consider a narrower scope.
>
C-style variable scope is near the top of met live code wishlist . . .
--
Dr. Richard E. Hawkins, Esq.
(702) 50
On 2016-04-29 17:24, Richard Gaskin wrote:
In the rare cases where we might want to modify the string being
traversed, does the "repeat with i = 1 to..." form still allow that?
Yes - you can still modify the string being traversed with repeat for
each, but the modifications won't actually affe
Mark Waddingham wrote:
> On 2016-04-29 04:30, Kay C Lan wrote:
>> Does that mean the 'Important' note in the LC 8 Dictionary entry for
>> 'repeat' isn't so Important any more?
>
> Yes! That note should probably be replaced by one which says you can
> modify the target variable in the loop, but it
Bob Sneidar wrote:
> Agreed, but then you need to be careful about what any of your
> variables contain. :-)
This sort of hints at a question I've been wondering throughout this
thread: why is this needed?
If you find yourself needing to clear variables of a particular scope,
maybe that's r
On 2016-04-29 04:30, Kay C Lan wrote:
On Thu, Apr 28, 2016 at 11:47 PM, Mark Waddingham
wrote:
From 7.0 onwards, this causes no problem as the engine takes a 'copy'
of
the target variable at the start of the loop. (Note you only pay for
that
copy when you mutate tList subsequently, and tha
Agreed, but then you need to be careful about what any of your variables
contain. :-)
As for tVar, I wasn't aware that you *could* modify it now. Last time I did
this is when I started working with this repeat form, which I use religiously
now, and ended up with scary nonsense in x. Apparently,
On Thu, Apr 28, 2016 at 11:47 PM, Mark Waddingham wrote:
>
> From 7.0 onwards, this causes no problem as the engine takes a 'copy' of
> the target variable at the start of the loop. (Note you only pay for that
> copy when you mutate tList subsequently, and that mutation has no effect on
> the rep
On 2016-04-28 03:31, Kay C Lan wrote:
If you do not understand what isn't 'variable' and what really gets
checked
at each iteration for each style of repeat then you are likely to see
some
unexpected results. On the other hand, if do understand what is really
going on, then you can modify x to
Possibly tricky, but this should work, no?:
set the script of tObj to the script of tObj
--
Richard Gaskin
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
ambassa...@fourthworld
On Wed, Apr 27, 2016 at 11:32 PM, Bob Sneidar
wrote:
>
> well... to be clear, you can in a repeat with x = 1 to n form.
Well to be really clear you NEED to be careful if you intend to modify x or
tVar in both cases:
repeat with x = 1 to the number of items in tVar
repeat for each item x in tVa
On Apr 22, 2016, at 13:04 , stephen barncard
mailto:stephenrevoluti...@barncard.com>> wrote:
you don't want to mess with the index variable in a repeat loop
well... to be clear, you can in a repeat with x = 1 to n form. It's in the
repeat for each form you want to avoid modifying the source d
This is slight variation of Craig's solution. It works if you want to delete
all local variables declared outside of handlers. (it's used inside libUrl)
on ulDeleteLocals
local e
repeat for each item e in line 3 of the localNames
get "delete" && "local" && e
do it
end repeat
end ulD
Craig’s code works. I should’ve tested.
As a design alternative, you could use a single local variable for all those
arrays. Then you could reinitialize without invoking "do;" code that applies
to multiple arrays may be less verbose.
— Dick
___
use-l
end repeat
breakpoint
repeat for each item x in tLocalVars
do "put empty into" && x
end repeat
end mouseUp
The first part loads, the second part empties.
-Original Message-
From: stephen barncard
To: How to use LiveCode
Sent: Fri, Apr 22, 2016 4:06 pm
On Fri, Apr 22, 2016 at 12:48 PM, Sannyasin Brahmanathaswami <
bra...@hindu.org> wrote:
> repeat for each item x in tLocalVars
> put empty into x
>end repeat
>
you don't want to mess with the index variable in a repeat loop
repeat for each item x in tLocalVars
put empty into it
> On Apr 22, 2016, at 12:48 PM, Sannyasin Brahmanathaswami
> wrote:
>
> repeat for each item x in tLocalVars
>put empty into x
> end repeat
repeat for each item x in tLocalVars
set the text of x to empty
end repeat
___
use-livecode mailing list
When doing list processing… it is not unusual to end up with duplicated data in
persistent variables.
Local tWhatEverList # is persistent, like a global, for the script that
contains it. So if you are putting data into it on a repeat loop… it gets added
every time the cmd/fnc is called.
I tri
26 matches
Mail list logo