Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - tomcatmandu

#1
newLISP and the O.S. /
March 25, 2009, 10:41:35 AM
Thank you guys for your help.



I used the new function "search" that scans file content in an open file.

I believe it will do what I want it to do.



However, the manual states that after a search the file pointer is positioned

to the end of the search string by default.  Incorrect.  The file pointer is

positioned to the beginning of the search string.



I used a bool-flag of true in the third parameter to have it position the

file pointer to the end of the search string.
#2
newLISP and the O.S. /
March 25, 2009, 08:21:20 AM
(find "xxxxxx" data) works just fine without doubling up on the inverse slashes.



If I put double slashes in find-all, it returns an empty list.  If I use left and right braces instead of the double quotation marks, it also returns an empty list. If I use braces and double inverse slashes, it returns an empty list.



The only way I can get it to return anything but the empty list is this:

(find-all "xxxxxx00xxx" data)



Then it chops off the list elements beginnin with the null byte.



I am using version 10.0.2.  I also tried using the UTF-8 version.  Things got really nasty then.  Thanks for you quick reply.
#3
newLISP and the O.S. / Bug in find-all
March 25, 2009, 07:51:34 AM
I am using Windows XP SP3.  I have read a file into string for searching.

Here are the first few characters of that file printed on the screen with a string slice.  String name is a.





"Rar!260700207144s0000r"



find seems to work ok, but using find-all works a little different.



(find-all "2607" a) will return a lot of hits for "2607" (as it should).



(find-all "260700207144" a) also returns a lot of hits for "2607".

It should be returning a lot of hits for the original search string:

"260700207144".

I am wondering if it is really finding that number of search strings or if the the 00 value in the string is messing up the the returned list.