Scripting what should be a simple loop...
rene.micout at numericable.com
Sat Jul 10 04:10:49 CDT 2010
I like Richmond's disillusioned vision of life !
Le 10 juil. 2010 à 10:45, Richmond a écrit :
> On 07/10/2010 02:23 AM, David C. wrote:
>> Good grief! Will someone be so kind as to show me the proper way to
>> format my script...
> 'the proper way" . . . Um; that is slightly funny as, unlike
> Fortran IV (what a pain it was) there is no strict set of
> rules as to how to format a script.
> This is both RunRev's strength and its weakness; insofar
> as there are multiple solutions to almost everything.
>> Let's say I have the following
>> 1 group named "AllFields" containing:
>> 10 text fields, named Field1...Field10
>> 10 temporary variables named tVar1...tVar10
>> All I want to do, using a loop, is to put the user supplied data
>> contained in each field into the corresponding, like-named variable. I
>> thought I could do something easy like this
> "All I want is a room with a view . . . " (mind you, from what I know of lunatic asylums,
> not many of them have cells with nice views).
> Let's see:
> 1. Ugh: 'repeat for i = 1 to 10' throws a bluey.
> Oh, bu**er, I had forgotten that the Linux version of RunRev 4.0 has a serious SLOWNESS problem
> with the Dictionary; half a mo; turning on the Mac - boy, do I miss Bill Marriott.
> Well, talk about "bloody silly"; here I am progging with RunRev on the Linux box while consulting
> the RunRev dictionary on the Mac . . . :)
> 2. repeat WITH . . . .
> THAT could make all the difference: I'm off back to my padded cell.
>> repeat for i = 1 to 10
>> put fld "Field"& i of grp "AllFields" into tVar& i
>> end repeat
>> I know that I've done this before, but so far I've yet to find the
>> right format that will not cause an error when compiling the script
>> -and- would greatly appreciate it if some kind soul would rescue me
>> from this madness.
> Well; if it gives you any comfort at all (which it won't), yesterday I had
> a "battle" as the script editor kept telling me a rather long and winding
> script (about 500 lines) was alright everytime I compiled it.
> However, when I tried to run the script it "threw a bluey" and opened
> the script editor in that rather unhelpful way where it marks the problem
> but doesn't allow you to edit it.
> Just to make you feel even cosier; I find your script extremely difficult
> to understand; not because there is anything at all intrinsically wrong
> with it, but because my scripting method / style is totally different.
> This is what I meant up the top there: RunRev can be used by lots of folk, all with highly
> individualised scripting styles - thus allowing great flexibility and folk who are not
> naturally "computery" to get up and running remarkably quickly. What is also means is that
> when it comes time for somebody to edit the scripts of the RunRev genius who went
> bonkers and is now locked up in a secure unit, they cannot get anywhere at all; or, prior to
> worrying about the algorhythmic aspects of the code they have to spend an awful long time
> working out how the genius's mind worked vis-a-vis programming.
>> FWIW, I recently had another fifty-something birthday, so I'm blaming it
>> all on an increasing case of dementia. As in:
>> "Dementia (meaning "deprived of mind") is a serious loss of cognitive
>> ability in a previously unimpaired person, beyond what might be
>> expected from normal ..."
> Well; speaking as a relative baby (48 last February) I ca cheerfully say:
> 1. My short term memory is already half-rotted.
> 2. I cannot tell you much about what is termed "long-term memory" as I don't seem to have one
> beyond a series of oft-repeated anecdotes which drive my teenage sons up the wall.
> 3. Having suffered from an element of creative insanity all my life a bit of "loss of
> cognitive ability" might not necessarily be all bad . . . :)
> So long and thanks for all the fish.
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode