3 weeks ago
Consider the following
Reading a file in the same dictionary with the pln file:
The first part until i_path is straightforward.
But then for some Reason the string is not:
i_path = "C:\path\to\file.text"
but
i_path = "C:\\path\\to\\file.text
-> BUG 1 ?
Session protokol only reports the first (\\ as \)
So I have to filter out the escape characters. Which I don't know how many
STRLEN also ignores Escape Characters so "\\" is one character
-> BUG2 ?
FOR i = 1 TO i_len_path+20 ! that is stupid but it works
REQUEST ("Name_of_plan", "", r_filename_noext, r_filename, r_fpath)
r_fpos = STRSTR(r_fpath,r_filename)
relpath = STRSUB(r_fpath,1,r_fpos-1)
i_path = relpath+i_fname
i_len_path = STRLEN(i_path)
i_len_add = 0
i_pathnew = ""
FOR i = 1 TO i_len_path+20 ! that is stupid but it works
tempchar = STRSUB(i_path,i,1)
IF tempchar = "\" THEN
IF last = 1 THEN
ELSE
i_pathnew = i_pathnew +tempchar
ENDIF
last = 1
ELSE
last = 0
i_pathnew = i_pathnew +tempchar
ENDIF
NEXT i
3 weeks ago
I have written about this issue in depth here.
Not really a "bug", but it's cumbersome nonetheless.
3 weeks ago
Very! Lets hope nobody ever names a folder like this:
c:\\new folder\notherfolder\\nthatsnotanewline\nbutthisis