Re: Weird Error Msg



SuNnY wrote:
On Feb 5, 6:34 pm, Bryan Oakley <oak...@xxxxxxxxxxxxxxxxxxxx> wrote:
SuNnY wrote:
Hi all !!
I am working on file and string searching. while executing my code , i
am getting this strange error msg. i tried everything but cudnt crack
what tclsh is trying to tell me ...
here is the complete error msg:
list element in quotes followed by "." instead of space
while executing
"foreach Str $TestStr {
"List element in quotes followed by <some character>" means the variable
doesn't contain a valid list (by virtue of it having a non-whitespace
character immediately after a quoting character).

My guess is, you're taking a random string from a file or from user
input and are trying to use it as a Tcl list, which you should not be doing.

--
Bryan Oakleywww.tclscripting.com

Hi !!

Well yes, i have to search for a particular string in a directory. my
idea is to search for particular type of file, and search for
particular string in each file.
But when while searching for files in a directory, the program stops
when it encounters more than one "." in the file/directory name. I try
to catch the list of the files in a list and then by using foreach i
am reading and searching file for particular string.

How to over come this ? problem

You aren't showing us your actual code. The problem you are trying to solve is trivial, but apparently the way you are going about it is not.

How are you doing the "search for particular type of file" part of the algorithm? You should probably be using the "glob" command, but I'm guessing you're not since the "list" of files you are iterating over isn't a valid list.

Step one in us helping you solve the problem is to show us how you are computing the list of files you are iterating over.




Also can someone guide me to complete documentation on file searching
( not the content of file)

http://www.tcl.tk/man/tcl8.4/TclCmd/glob.htm



--
Bryan Oakley
www.tclscripting.com
.



Relevant Pages

  • Re: Making a group of objects up and down
    ... This will be evaluate, before animate executing. ... there are definitely disadvantages to passing a string literal here. ... Why 'animate' isn't parse when i call setTimeout? ... A Function object is also _not_ evaluated when a reference to it is passed ...
    (comp.lang.javascript)
  • Re: Weird Error Msg
    ... I am working on file and string searching. ... while executing my code, i ... am getting this strange error msg. ... for various ways of converting strings to lists. ...
    (comp.lang.tcl)
  • Re: How to find the startup directory of my program?
    ... * Utility class to get String and File reference to the local directory ... public class LocalDir ... * Returns the disk file name of the class that is executing. ... * Returns the name of the local directory based on the results of a call ...
    (comp.lang.java.programmer)
  • RE: How to save html tags at SQL Server?
    ... If you are executing a string, ... It would be safer for you to use the SqlCommand object and define a parameter ... with a specified type such as SqlDbType.Text or SqlDbType.VarChar (depending ... the data that would normally be invalid when executing a string. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Help DLL calling in Excel 2007 crashes
    ... functions calls a function in a DLL and when that DLL function returns, ... VBA continues executing by starting the same VBA function over. ... ByRef szCompany As String, ByRef szCode As String) As Long ...
    (microsoft.public.excel.programming)