#34728 - 2003-01-02 07:21 PM
Re: Max Length of a Variable
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Well, yeah.. you missed it.. from the manual:
"A variant of type string can contain up to 32,000 characters. Integer variables can contain any value between 2,147,483,648 and 2,147,483,647."
Brian
|
|
Top
|
|
|
|
#34730 - 2003-01-02 07:24 PM
Re: Max Length of a Variable
|
ElegantSol
Fresh Scripter
Registered: 2002-11-28
Posts: 34
Loc: Cranbury, NJ, USA
|
Sorry, but I meant to say the Lenght of the Nname of a variable.
Steve
_________________________
Stephen
If the solution to the problem be concise and artfully or ingeniously contrived yet simple and handsome in effect, then the solution merits the adjective elegant. -- K.G. Wilson
|
|
Top
|
|
|
|
#34731 - 2003-01-02 08:09 PM
Re: Max Length of a Variable
|
kholm
Korg Regular
   
Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
|
In KiX-versions prior to 4.0 this was the rules for variablenames were:- Can't contain operator characters (+,-,*,/,&,<,>,=)
- Must not exceed 14 characters.
- Must be unique within the same scope, which is the range from which the variable can be referenced in a script, or script segment.
From KiX-version 4.0 and upwards the rule: Must not exceed 14 characters. Is omitted from the documenteation, so I gues we will have to ask Ruud if the length of variablenames can be anything up til 32000 in KiX 4.+ ???
Until then you might consider 14 as the maximum length.
I have seen somewhere in the old documentation, that you can use longer names than 14, but anything in the name after the 14’s char will be ignored.
Example: $ThisIsLongChar $ThisIsLongChar2
Will both be treated as the same variable: $ThisIsLongCha
-Erik
|
|
Top
|
|
|
|
#34733 - 2003-01-02 10:41 PM
Re: Max Length of a Variable
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
Hmm.. I took him to mean the length of a string.. Length of the identifier is a bit different..
After some testing, I haven't found a limit to the size of variables... I tried 2000 characters and it still worked. However, everything gets EXTREMELY slow, so shorter variable names are desirable!
Brian
|
|
Top
|
|
|
|
#34734 - 2003-01-02 11:45 PM
Re: Max Length of a Variable
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Brian, I thought you had already discovered that shorter variable names are faster - especially after you published your SORT function - the one that blew CombSort away I think short variable names can give a worth-while speed boost, especially for those types of intensive applications.
-Shawn
|
|
Top
|
|
|
|
#34735 - 2003-01-03 01:31 AM
Re: Max Length of a Variable
|
ElegantSol
Fresh Scripter
Registered: 2002-11-28
Posts: 34
Loc: Cranbury, NJ, USA
|
Thanks for the responses!
I am glad I was able to fire up an interesting discussion. Perhaps the moderator should move this thread to the FAQ area because the subject is not included in any of the new documentation!
Steve
_________________________
Stephen
If the solution to the problem be concise and artfully or ingeniously contrived yet simple and handsome in effect, then the solution merits the adjective elegant. -- K.G. Wilson
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 781 anonymous users online.
|
|
|