Re: [Script] Mysterious error

Date : Tue, 04 May 2004 10:30:42 +0200
To : XSI(at)Softimage.COM
From : Mikael Nordenberg <mikaeln(at)speech.kth.se>
Subject : Re: [Script] Mysterious error
Using something like:
for(i=0; i<10; i++) {
  ...
}

Is VERY dangerous, since it creates a global variable "i".
These bugs can be really hard to trace.
Use:

var i;
for(i=0; i<10; i++) {
  ...
}

or:

for(var i=0; i<10; i++) {
  ...
}

Instead.

If you need another loop later, then reuse the same variable.
(Without the var statement.)

/Mikael

Bernard Lebel wrote:
Ok I found the problem.
The enumerator is named "f". In the function, near the end, f is used for a
for() statement. I thought you could use same letters for such things when
they are not in same function, but obviously you can't. Using a different
name of the enumerator fixed the thing.


Thanks Bernard


----- Original Message ----- From: "Bernard Lebel" <atyss4si(at)hotmail.com> To: <XSI(at)Softimage.COM> Sent: Monday, May 03, 2004 11:03 PM Subject: Re: [Script] Mysterious error



of course, providing a script will help.

Bernard




I'm sorry, I have sent the wrong one. Stupid me.
Here's the good one.

Oh by the way, if you don't want to mess around, create a test folder on

a

drive, put a folder named S009 inside of it, and another named P023 into
that one. Then put a "decor" folder into that last one and put at least

one

file in it.

Thanks
Bernard

_________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN Premium


http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=htt p://hotmail.com/enca&HL=Market_MSNIS_Taglines

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.