PDA

View Full Version : Is it possible that you can have only 100 local variables in your code?


Tom David
06-09-2008, 05:42 AM
I attached a code which just defines 100 local variables. If I put this code in a Script window and execute it than the following error message appears:
Flexscript Error VIEW:/active/scriptinputconsole140731168/script>curtext line 101 syntax error, unexpected $undefined, expecting ';'
Could not finish parsing because of previous errors.

If I delete the last local variable than the error is gone. Looks like it make no difference if you define double, int or string.

So it looks like that there is a limitation of 100 local variables which is not a lot.
I know that there are work around but who wants to use work arounds?
But maybe I just did something wrong. Hopefully!

AlanZhang
06-09-2008, 11:04 AM
Hi Tom,

I just tested your code, it seems you are right. Good to know there is such a limitation. I am curious to know that there is a good reason to have such limitation or it is just a bug.

Goksin Yilmaz
07-29-2008, 12:05 PM
Are there any developments / suggestions for a resolution?

Thanks in advance.

Joe Allen
11-06-2008, 01:42 PM
I just ran up against this limitation after A LOT of coding before the moment of truth. I am really not looking forward to going line by line through thousands of lines of code and creating a more generic variable name schema workaround.

Any information from Flexsim on this limitation would be greatly appreciated. I would like to know if I have days of rework ahead of me or not.