Number of characters limited in scripts?

Discuss problems and solutions.
Post Reply
alexbausw
Newbie
Posts: 5
Joined: 11 Feb 2013 14:51

Number of characters limited in scripts?

Post by alexbausw »

Hello all,

I have the problem, that i could not enter more than about 4015 characters (incl. space and tab) in the editors script window. Is this a limitation in Lemur 4 itself or in the editor for windows 7?

best regards
Alex
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Number of characters limited in scripts?

Post by Macciza »

Hi
Pretty sure the official limit for scripts is 4096, see Changelog in manual, so yes . . .
Time to refactor / encapsulate some of it I think . . .

Cheers
MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
alexbausw
Newbie
Posts: 5
Joined: 11 Feb 2013 14:51

Re: Number of characters limited in scripts?

Post by alexbausw »

Hello Macciza

Thank you for your answer.
So a workaround could be to split code into two scripts and call the second from the first one. :)

greetings
Alex
Macciza
Regular
Posts: 1315
Joined: 07 Dec 2011 04:57
Location: Sydney, Australia.

Re: Number of characters limited in scripts?

Post by Macciza »

Yes

Look for sections of code that are repeated in different places and move them to a separate script that gets called and fed the necessary parameters . . .
Think more object-oriented / classes etc separating responsibility for different things etc

What are you doing that requires such a large monolithic script?

MM
iMac 2.8G i7 12G 10.6.8/10.7.2, Legacy Dexter/Lemur, Liine Lemur/iPad2, KMI SoftStep, 12Step & QuNeo , B-Controls, Mackie C4 etc
MaxMSP, Live Suite, Native Instrument stuff, etc Modified Virtual Guitar System etc All Projects/Modules © CC-BY-NC-SA[*][/b]
Traxus
Regular
Posts: 211
Joined: 30 Nov 2012 06:19
Location: Detroit
Contact:

Re: Number of characters limited in scripts?

Post by Traxus »

alexbausw wrote:Hello Macciza

Thank you for your answer.
So a workaround could be to split code into two scripts and call the second from the first one. :)

greetings
Alex
Yes, that would work, but every time you say that, god makes a programmer commit suicide. Please think of the other programmers!

You'll do yourself a much bigger favor by taking Macciza's advice and looking for duplicate blocks of code, and breaking them out into functions and so forth.
Post Reply