Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
For 2021 - online Python 3 training - see ((here)).

Our plans were to retire in summer 2020 and see the world, but Coronavirus has lead us into a lot of lockdown programming in Python 3 and PHP 7.
We can now offer tailored online training - small groups, real tutors - works really well for groups of 4 to 14 delegates. Anywhere in the world; course language English.

Please ask about private 'maintenance' training for Python 2, Tcl, Perl, PHP, Lua, etc.
TCL proc size limits

Posted by Rev.sjh (Rev.sjh), 28 July 2005
I have been programming in TCL for a few months - mostly writing scripts to scrape data from files on the Quovadx Integration engine.  My question is:

Is there a size limit (line, characters, bytes, etc) for TCL procedures.  whether this be for Unix, TCL, or the Quovadx engine (platform V).  The reason I ask, is over the last couple of months, we have a rather large  proc, that we keep adding mini-procs to.  Every so often, we find that parts we haven't touched in months will have missing text or syntax errors in them.  We are wondering if there is a file size limit and we could be losing stuff.  Only a few programmers have access to that area of the system and none of them were working on it, between the time the procedure worked fine and when it was broken.  I tried googling for information, and looked in a couple of books - but could not find anything.  Any information would be helpful.  

I copied the entire proc to notepad in windows and it is only 270kb - so if it is a size problem; I am thinking it may be the number of lines.  However, I could not find any documentation as to what the max number of lines would be.

Posted by admin (Graham Ellis), 28 July 2005
There's bound to be some sort of limit ... but I suspect that it's very much higher than the code you're working on and there could be other issues.

Tcl is a pure intepretive language, and syntax errors occur at run time when the paricular code where there's an issue runs.   If the contents of a variable contain something that otherwise could be taken as an option, this can cause run time errors even after code has been running otherwise correctly for years.

Posted by Rev.sjh (Rev.sjh), 29 July 2005

Thanks for the information. However that is not the issue.  I did a compare between our test and live systems and there are clearly sections or a couple of characters of code that show up to be missing or added.  Again these are in programs that have not been touched in months.  I guess I will have to assume that someone was in there looking around and mistakenly typed or deleted something when they thought they were working on something else.  The Programmer who is responsible for the entire system has no clue as to why this is happening either, but has also seen other oddities in areas only he works on.  Unfortunately our company does not have the best of procedures to track this sort of thing.  Everyone signs on with the same username/password and has equal rights (permissions).  We just keep adding more programmers - even though we try to fight against it because this system is the bread and butter of the company.  I guess I will just have to keep fixing the errors as  find them.  Thank God most of these issues have been in test and not production.

Posted by admin (Graham Ellis), 30 July 2005
Yes, alas, you don't have an audit trail and you don't have your files locked down against accidental or even deliberate alteration by a programmer so it's very hard to find out what's happening.

Could it be that there's some sort of file locking issue if two programmers are in the same file at the same time ... and they save or edit "on top of" each other?  Do you use editing programs that alter the files "in situ" rather than editing copies that are then save back?   If you do, this would be a prime area to look at.

I'm also wondering if you're using some sort of upload / management software for your files and / or data that could be making the changes?  Finally, I wonder if you just might have some sort of virus / trojan;  I hate to suggest that, but if you've left your security wide open internally, there's a chance that you haven't considered your external security thoroughly enough.

How would I proceed towards finding out / solving the problem?

Firstly, I would look to gather more evidence of the pattern of the corruptions.  That would give me a MUCH better idea of what is happening.  

Secondly, I would run a regular script (daily?) that compared the old (backup) files with the current ones and emailed me a notification of any changes - the Unix / linux diff command is the one I personally would use.  That way I would be alterted to changes.

Third, I would look to separate login accounts for each programmer ... then at least I would know who was logged in at the time that any problems occurred even if they all had access to the same files.

Fourth, I would look to splitting up what I gather are huge Tcl files into a series of smaller files linked via commands such as source.  Not only would this reduce any file locking / two people editing at the same time issues, but it would also let you move toward limiting who can alter which files.

This page is a thread posted to the opentalk forum at and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2022: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: • WEB: • SKYPE: wellho