Help, what am I doing wrong???

Howard Bornstein howard.bornstein at gmail.com
Sat Jul 30 13:25:39 EDT 2005


On 7/30/05, Dennis Brown <see3d at writeme.com> wrote:
> I have the following script (much simplified from original).
> In the form shown, it generates results and saves them into the
> following variable names:
> openSAW
> openSAWW
> openSAWWW
> openSAWWWW
> openSAWWWWW
> openSW
> 
> This is not what I intended!
> However if I make a small change to the script as shown in the
> comments it works fine and fills the globals with the results.
> 
> Can anyone tell me what I am doing wrong with the original script?
> 
> Dennis
> 
> 
>      global
> typSAPW,openSAPW,lowSAPW,highSAPW,closeSAPW,dVol7WEMAW,volP50EMAW,volP50
> EMA5W,IIV50W
>      --
> ON mouseUp
>      local inNames1,fileText1
>      put
> "OpenSAP,LowSAP,HighSAP,CloseSAP,TypSAP,DVol7WEMA,VolP50EMA,VolP50EMA5,I
> IV50," into inNames1
>      put "123"&cr&"456"&cr&"789"&cr into fileText1
>      REPEAT for each item inName1 in inNames1 --replace inName1 with
> n1 and uncomment next line to make this work
>          --   put n1 into inName1
>          put "W" after inName1
>          do "put fileText1 into "&inName1
>          do "split "&inName1&" with cr"
>      END repeat
>      get it
> END mouseUp


Weird! Interestingly, if you manually step through your script in
debug mode (or run in trace mode) it works fine. It only exhibits this
strange behavior if you let it rip at full speed. (???)

Also, try this: put a breakpoint at the line "put "W" after inName1".
Run the script and click "step into" after you hit the breakpoint and
watch the value of inName1 change in the variable watcher. Very
strange!

-- 
Regards,

Howard Bornstein
-----------------------
www.designeq.com



More information about the use-livecode mailing list